chore(bench): more determinism (#13603)

This commit is contained in:
DaniPopes
2024-12-31 03:42:07 +01:00
committed by GitHub
parent c253d12af7
commit 9a062c0844
9 changed files with 24 additions and 41 deletions

View File

@ -10,7 +10,7 @@ use reth_trie::Nibbles;
use reth_trie_sparse::RevealedSparseTrie;
fn update_rlp_node_level(c: &mut Criterion) {
let mut rng = generators::rng_with_seed(&12345_u16.to_be_bytes());
let mut rng = generators::rng();
let mut group = c.benchmark_group("update rlp node level");
group.sample_size(20);

View File

@ -169,6 +169,7 @@ fn calculate_root_from_leaves_repeated(c: &mut Criterion) {
trie_updates.finalize(hb, node_iter.walker.take_removed_keys());
}
}
(storage, storage_updates, trie_updates)
},
)
});
@ -205,6 +206,7 @@ fn calculate_root_from_leaves_repeated(c: &mut Criterion) {
}
sparse.root().unwrap();
}
sparse
},
)
});