public async Task RunBenchmarks() { try { Console.WriteLine($"Test Read Latency between a Single Region Account vs Multi-Region Account\n{Helpers.Line}\nPlease wait..."); //Run benchmarks, collect results foreach (Benchmark benchmark in benchmarks) { await Benchmark.ReadBenchmark(benchmark); } //Summarize the results Console.WriteLine($"\nOverall Summary\n{Helpers.Line}"); foreach (Benchmark benchmark in benchmarks) { ResultSummary r = benchmark.resultSummary; Console.WriteLine("Test: {0,-20} 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(); } }
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(); } }
public async Task RunBenchmarks() { try { Console.WriteLine($"Test Consistency vs. Latency and Consistency vs Throughput\n{Helpers.Line}\n"); //Run benchmarks, collect results foreach (Benchmark benchmark in benchmarks) { if (benchmark.benchmarkType == BenchmarkType.Write) { await Benchmark.WriteBenchmark(benchmark); } else { await Benchmark.ReadBenchmark(benchmark); } } //Summarize the results Console.WriteLine($"\nOverall Summary\n{Helpers.Line}"); foreach (Benchmark benchmark in benchmarks) { ResultSummary r = benchmark.resultSummary; Console.WriteLine("Test: {0,-26} 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(); } }