summaryrefslogtreecommitdiffstats
path: root/benches/2022.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2022-12-12 05:26:51 -0500
committerJesse Luehrs <doy@tozt.net>2022-12-12 05:26:51 -0500
commit0192b90ef99e937b10bc81ba20497467409869e2 (patch)
treeb04feec84b8c7708bfdb5ba89883771e64d96b05 /benches/2022.rs
parent43d0b602061b8cafde559d3bb4955b73bce16ea8 (diff)
downloadadvent-of-code-0192b90ef99e937b10bc81ba20497467409869e2.tar.gz
advent-of-code-0192b90ef99e937b10bc81ba20497467409869e2.zip
add combined benchmark
Diffstat (limited to 'benches/2022.rs')
-rw-r--r--benches/2022.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/benches/2022.rs b/benches/2022.rs
index b6ee3df..4838721 100644
--- a/benches/2022.rs
+++ b/benches/2022.rs
@@ -41,7 +41,29 @@ day!(2022, 11, day11);
day!(2022, 12, day12);
// NEXT DAY
+fn bench_2022(c: &mut criterion::Criterion) {
+ c.bench_function("2022", |b| {
+ b.iter(|| {
+ day_combined!(2022, 1, day1);
+ day_combined!(2022, 2, day2);
+ day_combined!(2022, 3, day3);
+ day_combined!(2022, 4, day4);
+ day_combined!(2022, 5, day5);
+ day_combined!(2022, 6, day6);
+ day_combined!(2022, 7, day7);
+ day_combined!(2022, 8, day8);
+ day_combined!(2022, 9, day9);
+ day_combined!(2022, 10, day10);
+ day_combined!(2022, 11, day11);
+ day_combined!(2022, 12, day12);
+ // NEXT DAY COMBINED
+ })
+ });
+}
+criterion::criterion_group!(benches_2022, bench_2022);
+
criterion::criterion_main!(
+ benches_2022,
bench_2022day1,
bench_2022day2,
bench_2022day3,