public static void Run() { #if DEBUG var runner = new CachedFunctionWithEnumerableKeys(); runner.OneHit(); runner.OneMiss(); runner.OneHitAndOneMiss(); runner.OneHundredHits(); runner.OneHundredMisses(); runner.OneHundredHitsAndOneHundredMisses(); #else BenchmarkRunner.Run <CachedFunctionWithEnumerableKeys>(ManualConfig .Create(DefaultConfig.Instance) .With(Job.MediumRun.WithLaunchCount(1)) .With(MemoryDiagnoser.Default)); #endif }
static void Main(string[] args) { var benchmarkId = GetBenchmarkId(args); switch (benchmarkId) { case 0: CachedFunctionWithSingleKey.Run(); break; case 1: CachedFunctionWithEnumerableKeys.Run(); break; case 2: LocalCaches.Run(); break; default: Console.WriteLine("No benchmarks found with Id - " + benchmarkId); break; } }