#[allow(unused_imports)] use criterion::{criterion_group, criterion_main, Criterion}; pub fn fibonacci(number: u32) -> u32 { let mut a = 0; let mut b = 1; for _ in 0..number { let tmp = a; a = b; b = a + tmp; } b } fn fibonacci_benchmark(c: &mut Criterion) { c.bench_function("Bench the fibonacci function", |b| b.iter(|| fibonacci(15))); } criterion_group!(benches, fibonacci_benchmark); criterion_main!(benches);