public async Task RunBenchmarks() { try { Console.WriteLine($"Test Latency between Strong Consistency in all regions vs. Custom Synchronization in two regions\n{Helpers.Line}\n"); //Run benchmarks, collect results foreach (Benchmark benchmark in benchmarks) { if (benchmark.benchmarkType == BenchmarkType.Write) { await Benchmark.WriteBenchmark(benchmark); } else if (benchmark.benchmarkType == BenchmarkType.Custom) { await Benchmark.CustomSyncBenchmark(benchmark); } } //Summarize the results Console.WriteLine($"\nOverall Summary\n{Helpers.Line}\n"); foreach (Benchmark benchmark in benchmarks) { ResultSummary r = benchmark.resultSummary; Console.WriteLine("Test: {0,-30} Average Latency: {1,-4} Average RU: {2,-4}", r.testName, r.averageLatency, r.averageRu); } Console.WriteLine($"\nTest concluded. Press any key to continue\n..."); Console.ReadKey(true); } catch (Exception e) { Console.WriteLine(e.Message + "\nPress any key to continue"); Console.ReadKey(); } }