blob: 575d045e4accc0ab6f83a46780243f265ab0ce90 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
fn run_benches(c: &mut Criterion) {
for size in [500, 10_000, 50_000].iter() {
c.bench_with_input(
BenchmarkId::new("example_stack-push_pop", size),
size,
|b, &n| {
b.iter(|| example_stack::push_pop(n));
},
);
}
}
criterion_group!(benches, run_benches);
criterion_main!(benches);
|