Use option for account index bucket parameter (#19150)
This commit is contained in:
committed by
GitHub
parent
8557dac51d
commit
651343688d
@@ -5,7 +5,7 @@ extern crate test;
|
||||
use rand::{thread_rng, Rng};
|
||||
use solana_runtime::{
|
||||
accounts_db::AccountInfo,
|
||||
accounts_index::{AccountSecondaryIndexes, AccountsIndex, BINS_DEFAULT},
|
||||
accounts_index::{AccountSecondaryIndexes, AccountsIndex, BINS_FOR_BENCHMARKS},
|
||||
};
|
||||
use solana_sdk::pubkey::{self, Pubkey};
|
||||
use test::Bencher;
|
||||
@@ -18,7 +18,7 @@ fn bench_accounts_index(bencher: &mut Bencher) {
|
||||
const NUM_FORKS: u64 = 16;
|
||||
|
||||
let mut reclaims = vec![];
|
||||
let index = AccountsIndex::<AccountInfo>::new(BINS_DEFAULT);
|
||||
let index = AccountsIndex::<AccountInfo>::new(Some(BINS_FOR_BENCHMARKS));
|
||||
for f in 0..NUM_FORKS {
|
||||
for pubkey in pubkeys.iter().take(NUM_PUBKEYS) {
|
||||
index.upsert(
|
||||
|
Reference in New Issue
Block a user