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

fn bench_serialization_peak(c: &mut Criterion) {
    let audio = sine_wave::<f32, f32>(440.0, Duration::from_secs_f32(0.5), 44100, 0.5);
    c.bench_function("serialization::peak", |b| {
        b.iter(|| black_box(audio.peak()))
    });
}

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