use audio_samples::{AudioStatistics, sine_wave};
use criterion::{Criterion, black_box, criterion_group, criterion_main};
use std::time::Duration;

fn bench_detection_peak(c: &mut Criterion) {
    let audio = sine_wave::<f32, f32>(220.0, Duration::from_secs(5), 44100, 0.6);
    c.bench_function("detection::peak", |b| b.iter(|| black_box(audio.peak())));
}

criterion_group!(benches, bench_detection_peak);
criterion_main!(benches);
