From 5b2a47e962cbd0d98735f1fa37c5c23a6feca891 Mon Sep 17 00:00:00 2001 From: Aria Shrimpton Date: Thu, 29 Feb 2024 16:28:23 +0000 Subject: some n value tweaking --- src/tests/example_mapping/benches/main.rs | 2 +- src/tests/example_mapping/src/types.pr.rs | 2 +- src/tests/example_stack/benches/main.rs | 8 ++++++-- src/tests/prime_sieve/benches/main.rs | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/tests/example_mapping/benches/main.rs b/src/tests/example_mapping/benches/main.rs index e681a68..bbca9f0 100644 --- a/src/tests/example_mapping/benches/main.rs +++ b/src/tests/example_mapping/benches/main.rs @@ -1,7 +1,7 @@ use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion}; fn run_benches(c: &mut Criterion) { - for size in [500, 10_000, 50_000].iter() { + for size in [10_000, 100_000, 500_000].iter() { c.bench_with_input( BenchmarkId::new("example_mapping-insert_get", size), size, diff --git a/src/tests/example_mapping/src/types.pr.rs b/src/tests/example_mapping/src/types.pr.rs index d85a0af..4a63e74 100644 --- a/src/tests/example_mapping/src/types.pr.rs +++ b/src/tests/example_mapping/src/types.pr.rs @@ -1,3 +1,3 @@ /*SPEC* -type Map = {c impl (Mapping) | true} +type Map = {c impl (Mapping) | true} *ENDSPEC*/ diff --git a/src/tests/example_stack/benches/main.rs b/src/tests/example_stack/benches/main.rs index 575d045..5b6076b 100644 --- a/src/tests/example_stack/benches/main.rs +++ b/src/tests/example_stack/benches/main.rs @@ -1,7 +1,7 @@ use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion}; fn run_benches(c: &mut Criterion) { - for size in [500, 10_000, 50_000].iter() { + for size in [1_000_000, 10_000_000, 50_000_000].iter() { c.bench_with_input( BenchmarkId::new("example_stack-push_pop", size), size, @@ -12,5 +12,9 @@ fn run_benches(c: &mut Criterion) { } } -criterion_group!(benches, run_benches); +criterion_group!( + name = benches; + config = Criterion::default().sample_size(20); + targets = run_benches +); criterion_main!(benches); diff --git a/src/tests/prime_sieve/benches/main.rs b/src/tests/prime_sieve/benches/main.rs index e75a589..9b1b8c2 100644 --- a/src/tests/prime_sieve/benches/main.rs +++ b/src/tests/prime_sieve/benches/main.rs @@ -3,7 +3,7 @@ use criterion::Criterion; use criterion::{criterion_group, criterion_main}; fn bench_sieve(c: &mut Criterion) { - for size in [10_000, 20_000, 50_000].iter() { + for size in [500, 20_000, 50_000].iter() { c.bench_with_input(BenchmarkId::new("prime_sieve", size), size, |b, &n| { b.iter(|| prime_sieve::prime_sieve(n)); }); -- cgit v1.2.3