From 033fe6b283f9827521781091b20aa5fae17d7f89 Mon Sep 17 00:00:00 2001 From: Brooks Prumo Date: Wed, 22 Jun 2022 22:51:58 -0500 Subject: [PATCH] remove benchmarks used just for dev --- runtime/benches/status_cache.rs | 41 --------------------------------- 1 file changed, 41 deletions(-) diff --git a/runtime/benches/status_cache.rs b/runtime/benches/status_cache.rs index 622e8756002cc4..c207a71246cc10 100644 --- a/runtime/benches/status_cache.rs +++ b/runtime/benches/status_cache.rs @@ -3,7 +3,6 @@ extern crate test; use { bincode::serialize, - itertools::Itertools, solana_runtime::{bank::BankStatusCache, status_cache::*}, solana_sdk::{ hash::{hash, Hash}, @@ -64,43 +63,3 @@ fn bench_status_cache_root_slot_deltas(bencher: &mut Bencher) { bencher.iter(|| test::black_box(status_cache.root_slot_deltas())); } - -// bprumo TODO: remove this bench -#[bench] -fn bench_status_cache_slot_deltas_get_roots_sorted(bencher: &mut Bencher) { - let mut status_cache = BankStatusCache::default(); - - // fill the status cache - let slots: Vec<_> = (42..).take(MAX_CACHE_ENTRIES).collect(); - for slot in &slots { - for _ in 0..5 { - status_cache.insert(&Hash::new_unique(), Hash::new_unique(), *slot, Ok(())); - } - status_cache.add_root(*slot); - } - - bencher.iter(|| { - let slots: Vec<_> = status_cache.roots().iter().cloned().sorted().collect(); - test::black_box(status_cache.slot_deltas(&slots)) - }); -} - -// bprumo TODO: remove this bench -#[bench] -fn bench_status_cache_slot_deltas_get_roots_unsorted(bencher: &mut Bencher) { - let mut status_cache = BankStatusCache::default(); - - // fill the status cache - let slots: Vec<_> = (42..).take(MAX_CACHE_ENTRIES).collect(); - for slot in &slots { - for _ in 0..5 { - status_cache.insert(&Hash::new_unique(), Hash::new_unique(), *slot, Ok(())); - } - status_cache.add_root(*slot); - } - - bencher.iter(|| { - let slots: Vec<_> = status_cache.roots().iter().cloned().collect(); - test::black_box(status_cache.slot_deltas(&slots)) - }); -}