예제 #1
0
        public static void Generate(BenchmarkComparison comparison)
        {
            string outputPath = Path.Combine(
                Path.GetDirectoryName(comparison.FilePath),
                $"report-{comparison.Type}");

            Clean(outputPath);
            Generate(comparison, outputPath);
        }
예제 #2
0
        static void Main()
        {
            ILookup <string, Benchmark> benchmarksByType = Benchmark.FindAll(CurrentDirectory)
                                                           .ToLookup(benchmark => benchmark.Type);

            foreach (var benchmarks in benchmarksByType)
            {
                string type = benchmarks.Key;

                Console.WriteLine($"Generate comparison for benchmarks of type '{type}'...");
                var fileName   = Path.Combine(CurrentDirectory, $"{type}_comparison.csv");
                var comparison = BenchmarkComparison.Generate(benchmarks, type, fileName);

                Console.WriteLine($"Generating report for benchmarks of type '{type}'...");
                Report.Generate(comparison);
            }

            Console.WriteLine("Press any key to continue...");
            Console.ReadKey();
        }
예제 #3
0
 private static void Generate(BenchmarkComparison comparison, string outputPath)
 {
     Process
     .Start("jmeter.bat", $"-g \"{comparison.FilePath}\" -o \"{outputPath}\"")
     .WaitForExit();
 }