@@ -117,6 +117,7 @@ private static int Main(string[] args)
117117 performanceBenchmark . ReportDirPath ,
118118 performanceBenchmark . BaselineResultFilesExist ) ;
119119 WriteProgressedTestsAndMetricsToConsole ( performanceTestResults , performanceBenchmark ) ;
120+ WriteRegressedKnownTestsAndMetricsToConsole ( performanceTestResults , performanceBenchmark ) ;
120121 int result = WriteFailedTestsAndMetricsToConsole ( performanceTestResults , performanceBenchmark ) ;
121122 WriteLine ( $ "Finished with Result { result } ") ;
122123 return result ;
@@ -128,7 +129,7 @@ private static int WriteFailedTestsAndMetricsToConsole(PerformanceTestRunResult[
128129 . Any ( tr => tr . State == ( int ) TestState . Failure ) ;
129130 if ( failedTestsExist )
130131 {
131- WriteLine ( "FAILURE: One ore more performance test metric aggregations is out of threshold from the baseline value." ) ;
132+ WriteLine ( "FAILURE: One ore more performance test metric aggregations is out of threshold from the baseline value. REGRESSIONS! " ) ;
132133 WriteLine ( "-------------------------------------" ) ;
133134 WriteLine ( " Performance tests with failed metrics" ) ;
134135 WriteLine ( "-------------------------------------" ) ;
@@ -162,6 +163,57 @@ private static int WriteFailedTestsAndMetricsToConsole(PerformanceTestRunResult[
162163 return performanceBenchmark . FailOnBaseline && failedTestsExist ? 1 : 0 ;
163164 }
164165
166+ private static void WriteRegressedKnownTestsAndMetricsToConsole ( PerformanceTestRunResult [ ] performanceTestResults , PerformanceBenchmark performanceBenchmark )
167+ {
168+ bool loggedHeader = false ;
169+ var passedTestsExist = performanceTestResults . SelectMany ( ptr => ptr . TestResults )
170+ . Any ( tr => tr . State == ( int ) TestState . Success ) ;
171+ if ( passedTestsExist )
172+ {
173+
174+ foreach ( var performanceTestRunResult in performanceTestResults )
175+ {
176+ var passedTests = performanceTestRunResult . TestResults . Where ( tr => tr . State == ( int ) TestState . Success ) ;
177+ if ( passedTests . Any ( ) )
178+ {
179+ foreach ( var tests in passedTests )
180+ {
181+ if ( tests . SampleGroupResults . Any ( sgr => sgr . RegressedKnown && sgr . Regressed ) )
182+ {
183+ if ( ! loggedHeader )
184+ {
185+ loggedHeader = true ;
186+ WriteLine ( "Info: One ore more performance test metric aggregations is out of threshold from the baseline value. KNOWN REGRESSIONS!" ) ;
187+ WriteLine ( "-------------------------------------" ) ;
188+ WriteLine ( " Performance tests with Known Regressions metrics" ) ;
189+ WriteLine ( "-------------------------------------" ) ;
190+ }
191+
192+ ++ indentLevel ;
193+ WriteLine ( "{0}" , tests . TestName ) ;
194+
195+ var progressedSgs = tests . SampleGroupResults . Where ( sgr => sgr . Progressed ) ;
196+ foreach ( var sampleGroupResult in progressedSgs )
197+ {
198+ WriteLine ( "----" ) ;
199+ WriteLine ( "Metric : {0}" , sampleGroupResult . SampleGroupName ) ;
200+ WriteLine ( "Aggregation : {0}" , sampleGroupResult . AggregationType ) ;
201+ WriteLine ( "New Value : {0,8:F2}" , sampleGroupResult . AggregatedValue ) ;
202+ WriteLine ( "Baseline Value: {0,8:F2}" , sampleGroupResult . BaselineValue ) ;
203+ WriteLine ( "Threshold % : {0,8:F2}" , sampleGroupResult . Threshold ) ;
204+ WriteLine ( "Actual Diff % : {0,8:F2}" , Math . Abs ( sampleGroupResult . BaselineValue - sampleGroupResult . AggregatedValue ) / sampleGroupResult . BaselineValue ) ;
205+ WriteLine ( $ "Known Issue: { sampleGroupResult . KnownIssueDetails } ") ;
206+ }
207+ -- indentLevel ;
208+ WriteLine ( "\r \n " ) ;
209+ }
210+ }
211+ }
212+ }
213+ }
214+
215+ }
216+
165217 private static void WriteProgressedTestsAndMetricsToConsole ( PerformanceTestRunResult [ ] performanceTestResults , PerformanceBenchmark performanceBenchmark )
166218 {
167219 bool loggedHeader = false ;
@@ -182,7 +234,7 @@ private static void WriteProgressedTestsAndMetricsToConsole(PerformanceTestRunRe
182234 if ( ! loggedHeader )
183235 {
184236 loggedHeader = true ;
185- WriteLine ( "Info: One ore more performance test metric aggregations is out of threshold from the baseline value." ) ;
237+ WriteLine ( "Info: One ore more performance test metric aggregations is out of threshold from the baseline value. PROGRESSIONS! " ) ;
186238 WriteLine ( "-------------------------------------" ) ;
187239 WriteLine ( " Performance tests with Progressed metrics" ) ;
188240 WriteLine ( "-------------------------------------" ) ;
0 commit comments