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();
            }
        }
Ejemplo n.º 2
0
        public async Task RunBenchmarks()
        {
            try
            {
                Console.WriteLine($"Test read and write latency between a Single-Master and Multi-Master account\n{Helpers.Line}\nPlease Wait...");

                //Run benchmarks, collect results
                foreach (Benchmark benchmark in benchmarks)
                {
                    if (benchmark.benchmarkType == BenchmarkType.Read)
                    {
                        await Benchmark.ReadBenchmark(benchmark);
                    }
                    else
                    {
                        await Benchmark.WriteBenchmark(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();
            }
        }
Ejemplo n.º 3
0
        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();
            }
        }