private static (bool compareSucceeded, bool regressionDetected) CheckEltTraces(string baselineFolder, string resultsFolder, bool failOnRegression) { var regressionDetected = false; // try look for ETL traces if (!TryGetETLPaths(baselineFolder, out var baselineEtlPath)) { return(false, regressionDetected); } if (!TryGetETLPaths(resultsFolder, out var resultsEtlPath)) { return(false, regressionDetected); } // Compare ETL if (!EtlDiffer.TryCompareETL(resultsEtlPath, baselineEtlPath, out regressionDetected)) { return(false, regressionDetected); } if (regressionDetected && failOnRegression) { return(true, regressionDetected); } return(false, regressionDetected); }
public static async Task <int> CompareAsync( string baselineFolder, string resultsFolder, bool failOnRegression, ILogger logger, CancellationToken token) { token.ThrowIfCancellationRequested(); var(success, shouldCheckETL) = await BenchmarkDotNetDiffer.TryCompareBenchmarkDotNetResultsAsync(baselineFolder, resultsFolder, logger).ConfigureAwait(false); if (!success) { return(1); } if (shouldCheckETL) { // get file paths if (!TryGetETLPaths(baselineFolder, out var baselineEtlPath)) { return(1); } if (!TryGetETLPaths(resultsFolder, out var resultsEtlPath)) { return(1); } // Compare ETL if (!EtlDiffer.TryCompareETL(resultsEtlPath, baselineEtlPath, out var regression)) { return(1); } if (regression && failOnRegression) { return(1); } } return(0); }