29 lines
461 B
C#
29 lines
461 B
C#
using AdventOfCode.Days;
|
|
using BenchmarkDotNet.Attributes;
|
|
|
|
namespace AdventOfCode;
|
|
|
|
[ShortRunJob]
|
|
[MemoryDiagnoser(false)]
|
|
public class DayBenchmark
|
|
{
|
|
private Day Day { get; } = new Day1();
|
|
|
|
[GlobalSetup]
|
|
public void Setup()
|
|
{
|
|
Day.ReadInput();
|
|
}
|
|
|
|
[Benchmark]
|
|
public void Part1()
|
|
{
|
|
Day.RunPart1(display: false);
|
|
}
|
|
|
|
[Benchmark]
|
|
public void Part2()
|
|
{
|
|
Day.RunPart2(display: false);
|
|
}
|
|
} |