rs-basic/crates/criterion-demo/benches/my_benchmark.rs
Christoph J. Scherr ce71b2ceec
Some checks failed
cargo devel CI / cargo CI (push) Failing after 32s
reorganize the workspace
2025-03-14 22:24:47 +01:00

9 lines
302 B
Rust

use criterion::{black_box, criterion_group, criterion_main, Criterion};
use criterion_demo::fibonacci;
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);