Add benchmark support using -b
This commit is contained in:
23
DayBenchmarker.cs
Normal file
23
DayBenchmarker.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user