diff options
Diffstat (limited to 'src/tests/example_mapping/benches')
-rw-r--r-- | src/tests/example_mapping/benches/main.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tests/example_mapping/benches/main.rs b/src/tests/example_mapping/benches/main.rs index 04d43fb..77b2394 100644 --- a/src/tests/example_mapping/benches/main.rs +++ b/src/tests/example_mapping/benches/main.rs @@ -1,12 +1,14 @@ use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion}; +use rand::{rngs::StdRng, SeedableRng}; fn run_benches(c: &mut Criterion) { - for size in [10_000, 30_000, 60_000].iter() { + let mut rng = StdRng::seed_from_u64(42); + for size in [50, 150, 2_500, 7_500].iter() { c.bench_with_input( BenchmarkId::new("example_mapping-insert_get", size), size, |b, &n| { - b.iter(|| example_mapping::insert_get(n)); + b.iter(|| example_mapping::insert_get(&mut rng, n)); }, ); } |