Bank::new_for_benches uses bench config (#25017)

This commit is contained in:
Jeff Washington (jwash) 2022-05-06 13:35:18 -05:00 committed by GitHub
parent 7401bc0fa5
commit df9a4a0c9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 4 deletions

View File

@ -44,7 +44,7 @@ use {
pub const ITER_BATCH_SIZE: usize = 1000;
pub const BINS_DEFAULT: usize = 8192;
pub const BINS_FOR_TESTING: usize = 2; // we want > 1, but each bin is a few disk files with a disk based index, so fewer is better
pub const BINS_FOR_BENCHMARKS: usize = 2;
pub const BINS_FOR_BENCHMARKS: usize = 8192;
pub const FLUSH_THREADS_TESTING: usize = 1;
pub const ACCOUNTS_INDEX_CONFIG_FOR_TESTING: AccountsIndexConfig = AccountsIndexConfig {
bins: Some(BINS_FOR_TESTING),

View File

@ -1366,12 +1366,19 @@ impl Bank {
}
pub fn new_for_benches(genesis_config: &GenesisConfig) -> Self {
// this will diverge
Self::new_for_tests(genesis_config)
Self::new_with_paths_for_benches(
genesis_config,
Vec::new(),
None,
None,
AccountSecondaryIndexes::default(),
false,
AccountShrinkThreshold::default(),
false,
)
}
pub fn new_for_tests(genesis_config: &GenesisConfig) -> Self {
// this will diverge
Self::new_with_paths_for_tests(
genesis_config,
Vec::new(),