Пример #1
0
        static int UpdateBaseLine(string baseFile, string inputFile)
        {
            var inputTestSuite = new TestSuiteResult();

            inputTestSuite.Read(inputFile);

            if (File.Exists(baseFile))
            {
                var baseTestSuite = new TestSuiteResult();
                baseTestSuite.Read(baseFile);
                inputTestSuite.UpgradeToBaseline(baseTestSuite);
            }

            inputTestSuite.Write(baseFile);

            return(0);
        }
Пример #2
0
        static int GenerateResults(string baseFile, string inputFile, string resultsFile)
        {
            var baseTestSuite = new TestSuiteResult();

            if (File.Exists(baseFile))
            {
                baseTestSuite.Read(baseFile);
            }

            var inputTestSuite = new TestSuiteResult();

            inputTestSuite.Read(inputFile);

            inputTestSuite.RegisterPerformanceRegressions(baseTestSuite, out var regressions, out var improvements, out var newTests);
            inputTestSuite.Write(resultsFile);

            PrintTestCases("Performance Regressions:", regressions);
            PrintTestCases("Performance Improvements:", improvements);
            PrintTestCases("New Performance Tests:", newTests);

            return(inputTestSuite.HasErrors ? 1 : 0);
        }