2024-01-10 16:53:47 +01:00
|
|
|
use criterion::{black_box, criterion_group, criterion_main, Criterion};
|
2024-01-12 13:35:37 +01:00
|
|
|
use criterion_demo::fibonacci;
|
2024-01-10 16:53:47 +01:00
|
|
|
|
|
|
|
pub fn criterion_benchmark(c: &mut Criterion) {
|
|
|
|
c.bench_function("fib 20", |b| b.iter(|| fibonacci(black_box(20))));
|
|
|
|
}
|
|
|
|
|
|
|
|
criterion_group!(benches, criterion_benchmark);
|
|
|
|
criterion_main!(benches);
|