Make benchmark useful (#6440)

function is verify_hash_internal_state
This commit is contained in:
sakridge
2019-10-18 12:59:47 -07:00
committed by GitHub
parent 8c29700402
commit 35ed432d1a

View File

@ -63,7 +63,8 @@ fn test_accounts_hash_internal_state(bencher: &mut Bencher) {
let accounts = Accounts::new(Some("bench_accounts_hash_internal".to_string())); let accounts = Accounts::new(Some("bench_accounts_hash_internal".to_string()));
let mut pubkeys: Vec<Pubkey> = vec![]; let mut pubkeys: Vec<Pubkey> = vec![];
create_test_accounts(&accounts, &mut pubkeys, 60000, 0); create_test_accounts(&accounts, &mut pubkeys, 60000, 0);
let ancestors = vec![(0, 0)].into_iter().collect();
bencher.iter(|| { bencher.iter(|| {
accounts.hash_internal_state(0); accounts.verify_hash_internal_state(0, &ancestors);
}); });
} }