Added support for running benchmarks without baseline.

This commit is contained in:
mlemanczyk committed 2023-05-25 19:11:09 +02:00
1 parent 853a69fa4d
commit 8bef46f1cf
3 files changed
+5 -2

No files matched your search

@@ -66,7 +66,7 @@ namespace Recyclable.Collections.Benchmarks
)]
public override RecyclableCollectionsBenchmarkSource BenchmarkType { get => base.BenchmarkType; set => base.BenchmarkType = value; }
protected override Action GetTestMethod(RecyclableCollectionsBenchmarkSource benchmarkType)
protected override Action? GetTestMethod(RecyclableCollectionsBenchmarkSource benchmarkType)
=> (Action?) GetType().GetMethod($"{benchmarkType}_{TestCase}", BindingFlags.Instance | BindingFlags.Public)?.CreateDelegate(typeof(Action), this)
?? throw CreateMethodNotFoundException($"{benchmarkType}_{TestCase}", GetType().FullName);
}