aboutsummaryrefslogtreecommitdiff
path: root/src/tests/example_sets/benches/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/example_sets/benches/main.rs')
-rw-r--r--src/tests/example_sets/benches/main.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tests/example_sets/benches/main.rs b/src/tests/example_sets/benches/main.rs
index 26e8547..03ab904 100644
--- a/src/tests/example_sets/benches/main.rs
+++ b/src/tests/example_sets/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 [500, 2_000, 10_000, 50_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_sets-insert_n", size),
size,
|b, &n| {
- b.iter(|| example_sets::insert_n(n));
+ b.iter(|| example_sets::insert_n(&mut rng, n));
},
);
}