Skip to content

Commit

Permalink
Merge pull request #337 from mgeisler/shorten-benchmarks-warmup
Browse files Browse the repository at this point in the history
Shorten benchmark warm-up time
  • Loading branch information
mgeisler authored May 3, 2021
2 parents 01fa58b + 0e83d4c commit ff848f2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion benches/linear.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::time::Duration;

use criterion::BenchmarkId;
use criterion::Criterion;
use criterion::{criterion_group, criterion_main};
Expand Down Expand Up @@ -87,5 +89,9 @@ pub fn benchmark(c: &mut Criterion) {
group.finish();
}

criterion_group!(benches, benchmark);
criterion_group!(
name = benches;
config = Criterion::default().warm_up_time(Duration::from_millis(500));
targets = benchmark
);
criterion_main!(benches);

0 comments on commit ff848f2

Please sign in to comment.