Added benchmarks

This commit is contained in:
2022-12-06 02:17:08 +01:00
parent ee9dcc92c1
commit c75da6c077
7 changed files with 104 additions and 5 deletions

View File

@@ -1,3 +1,4 @@
#![feature(test)]
use anyhow::Result;
use aoc::Solver;
@@ -14,6 +15,19 @@ mod tests {
fn part1_test1() -> Result<()> {
Day::test(aoc::Part::ONE, "test-1", TEST)
}
// Benchmarks
extern crate test;
#[bench]
#[ignore]
fn part1_bench(b: &mut test::Bencher) {
Day::benchmark(aoc::Part::ONE, b)
}
#[bench]
#[ignore]
fn part2_bench(b: &mut test::Bencher) {
Day::benchmark(aoc::Part::TWO, b)
}
}
// -- Solution --