Add benchmark support using -b

This commit is contained in:
2022-12-17 21:48:16 +01:00
parent 147c348ee1
commit 63c866f5a0
20 changed files with 469 additions and 341 deletions

23
DayBenchmarker.cs Normal file
View File

@@ -0,0 +1,23 @@
using AdventOfCode.Days;
using BenchmarkDotNet.Attributes;
namespace AdventOfCode;
[ShortRunJob]
[MemoryDiagnoser(false)]
public class DayBenchmark
{
private Day Day => new Day15();
[Benchmark]
public void Part1()
{
Day.RunPart1(display: false);
}
[Benchmark]
public void Part2()
{
Day.RunPart2(display: false);
}
}