Exemple #1
0
        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
        }
Exemple #2
0
        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;
            }
        }