public static void Run() { #if DEBUG var runner = new CachedFunctionWithSingleKey(); runner.CacheHit(); runner.CacheMiss(); #else BenchmarkRunner.Run <CachedFunctionWithSingleKey>(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; } }