advent-of-code/aoc2020/aoc2020_bench/benches/aoc2020_bench.rs

59 lines
2.2 KiB
Rust
Raw Normal View History

2020-12-01 16:34:25 +01:00
use criterion::{criterion_group, criterion_main, Criterion};
use aoc2020::day01;
2020-12-02 12:50:50 +01:00
use aoc2020::day02;
2020-12-03 17:17:44 +01:00
use aoc2020::day03;
2020-12-04 10:58:35 +01:00
use aoc2020::day04;
2020-12-05 10:36:30 +01:00
use aoc2020::day05;
2020-12-06 12:43:48 +01:00
use aoc2020::day06;
2020-12-07 14:41:00 +01:00
use aoc2020::day07;
2020-12-08 16:03:33 +01:00
use aoc2020::day08;
2020-12-09 06:35:18 +01:00
use aoc2020::day09;
2020-12-10 14:09:47 +01:00
use aoc2020::day10;
2020-12-11 14:37:14 +01:00
use aoc2020::day11;
2020-12-12 14:06:03 +01:00
use aoc2020::day12;
2020-12-13 15:22:23 +01:00
use aoc2020::day13;
2020-12-14 14:58:19 +01:00
use aoc2020::day14;
2020-12-15 09:56:43 +01:00
use aoc2020::day15;
2020-12-16 09:28:45 +01:00
use aoc2020::day16;
2020-12-17 13:12:11 +01:00
use aoc2020::day17;
2020-12-18 15:56:26 +01:00
use aoc2020::day18;
2020-12-20 17:29:42 +01:00
use aoc2020::day19;
2020-12-21 18:42:12 +01:00
use aoc2020::day21;
2020-12-22 13:08:35 +01:00
use aoc2020::day22;
2020-12-23 23:58:34 +01:00
use aoc2020::day23;
2020-12-24 15:10:48 +01:00
use aoc2020::day24;
2020-12-01 16:34:25 +01:00
fn aoc2020_all(c: &mut Criterion) {
c.bench_function("day01", |b| b.iter(|| day01::run().unwrap()));
2020-12-02 12:50:50 +01:00
c.bench_function("day02", |b| b.iter(|| day02::run().unwrap()));
2020-12-03 17:17:44 +01:00
c.bench_function("day03", |b| b.iter(|| day03::run().unwrap()));
2020-12-04 10:58:35 +01:00
c.bench_function("day04", |b| b.iter(|| day04::run().unwrap()));
2020-12-05 10:36:30 +01:00
c.bench_function("day05", |b| b.iter(|| day05::run().unwrap()));
2020-12-06 12:43:48 +01:00
c.bench_function("day06", |b| b.iter(|| day06::run().unwrap()));
2020-12-07 14:41:00 +01:00
c.bench_function("day07", |b| b.iter(|| day07::run().unwrap()));
2020-12-08 16:03:33 +01:00
c.bench_function("day08", |b| b.iter(|| day08::run().unwrap()));
2020-12-09 06:35:18 +01:00
c.bench_function("day09", |b| b.iter(|| day09::run().unwrap()));
2020-12-10 14:09:47 +01:00
c.bench_function("day10", |b| b.iter(|| day10::run().unwrap()));
2020-12-11 14:37:14 +01:00
c.bench_function("day11", |b| b.iter(|| day11::run().unwrap()));
2020-12-12 14:06:03 +01:00
c.bench_function("day12", |b| b.iter(|| day12::run().unwrap()));
2020-12-13 15:22:23 +01:00
c.bench_function("day13", |b| b.iter(|| day13::run().unwrap()));
2020-12-14 14:58:19 +01:00
c.bench_function("day14", |b| b.iter(|| day14::run().unwrap()));
2020-12-15 09:56:43 +01:00
c.bench_function("day15", |b| b.iter(|| day15::run().unwrap()));
2020-12-16 09:28:45 +01:00
c.bench_function("day16", |b| b.iter(|| day16::run().unwrap()));
2020-12-17 13:12:11 +01:00
c.bench_function("day17", |b| b.iter(|| day17::run().unwrap()));
2020-12-18 15:56:26 +01:00
c.bench_function("day18", |b| b.iter(|| day18::run().unwrap()));
2020-12-20 17:29:42 +01:00
c.bench_function("day19", |b| b.iter(|| day19::run().unwrap()));
2020-12-21 18:42:12 +01:00
c.bench_function("day21", |b| b.iter(|| day21::run().unwrap()));
2020-12-22 13:08:35 +01:00
c.bench_function("day22", |b| b.iter(|| day22::run().unwrap()));
2020-12-23 23:58:34 +01:00
c.bench_function("day23", |b| b.iter(|| day23::run().unwrap()));
2020-12-24 15:10:48 +01:00
c.bench_function("day24", |b| b.iter(|| day24::run().unwrap()));
2020-12-01 16:34:25 +01:00
}
criterion_group! {
name = all_days;
2020-12-06 12:43:48 +01:00
config = Criterion::default().sample_size(200);
2020-12-01 16:34:25 +01:00
targets = aoc2020_all
}
criterion_main!(all_days);