advent-of-code/aoc2025/benches/aoc2025_bench.rs
Antoine Martin 7433687d69 2025: fix cargo fmt
Turns out rustfmt needs a --edition 2024 flag (which cargo fmt adds
automatically), otherwise some imports change order. Of course my editor
is configured to use rustfmt via apheleia, which does not support cargo
fmt. Urgh.
2025-12-08 16:39:16 +01:00

20 lines
605 B
Rust

use criterion::{Criterion, criterion_group, criterion_main};
use aoc2025::day01;
use aoc2025::day02;
use aoc2025::day03;
use aoc2025::day04;
fn aoc2025_all(c: &mut Criterion) {
c.bench_function("day01", |b| b.iter(|| day01::run().unwrap()));
c.bench_function("day02", |b| b.iter(|| day02::run().unwrap()));
c.bench_function("day03", |b| b.iter(|| day03::run().unwrap()));
c.bench_function("day04", |b| b.iter(|| day04::run().unwrap()));
}
criterion_group! {
name = all_days;
config = Criterion::default().sample_size(200);
targets = aoc2025_all
}
criterion_main!(all_days);