public static void Run() { #if DEBUG var runner = new LocalCaches(); runner.MemoryCache_Get(); runner.DictionaryCache_Get(); runner.MemoryCache_Set(); runner.DictionaryCache_Set(); runner.MemoryCache_GetMany(); runner.DictionaryCache_GetMany(); runner.MemoryCache_SetMany(); runner.DictionaryCache_SetMany(); #else BenchmarkRunner.Run <LocalCaches>(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; } }