@@ -117,6 +117,7 @@ private static int Main(string[] args)
117
117
performanceBenchmark . ReportDirPath ,
118
118
performanceBenchmark . BaselineResultFilesExist ) ;
119
119
WriteProgressedTestsAndMetricsToConsole ( performanceTestResults , performanceBenchmark ) ;
120
+ WriteRegressedKnownTestsAndMetricsToConsole ( performanceTestResults , performanceBenchmark ) ;
120
121
int result = WriteFailedTestsAndMetricsToConsole ( performanceTestResults , performanceBenchmark ) ;
121
122
WriteLine ( $ "Finished with Result { result } ") ;
122
123
return result ;
@@ -128,7 +129,7 @@ private static int WriteFailedTestsAndMetricsToConsole(PerformanceTestRunResult[
128
129
. Any ( tr => tr . State == ( int ) TestState . Failure ) ;
129
130
if ( failedTestsExist )
130
131
{
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! " ) ;
132
133
WriteLine ( "-------------------------------------" ) ;
133
134
WriteLine ( " Performance tests with failed metrics" ) ;
134
135
WriteLine ( "-------------------------------------" ) ;
@@ -162,6 +163,57 @@ private static int WriteFailedTestsAndMetricsToConsole(PerformanceTestRunResult[
162
163
return performanceBenchmark . FailOnBaseline && failedTestsExist ? 1 : 0 ;
163
164
}
164
165
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
+
165
217
private static void WriteProgressedTestsAndMetricsToConsole ( PerformanceTestRunResult [ ] performanceTestResults , PerformanceBenchmark performanceBenchmark )
166
218
{
167
219
bool loggedHeader = false ;
@@ -182,7 +234,7 @@ private static void WriteProgressedTestsAndMetricsToConsole(PerformanceTestRunRe
182
234
if ( ! loggedHeader )
183
235
{
184
236
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! " ) ;
186
238
WriteLine ( "-------------------------------------" ) ;
187
239
WriteLine ( " Performance tests with Progressed metrics" ) ;
188
240
WriteLine ( "-------------------------------------" ) ;
0 commit comments