@@ -174,6 +174,8 @@ pub struct ComparisonSummary {
174
174
num_improvements : usize ,
175
175
/// The cached number of comparisons that are regressions
176
176
num_regressions : usize ,
177
+ /// Which benchmarks had errors
178
+ errors_in : Vec < String > ,
177
179
}
178
180
179
181
impl ComparisonSummary {
@@ -208,10 +210,17 @@ impl ComparisonSummary {
208
210
} ;
209
211
comparisons. sort_by ( cmp) ;
210
212
213
+ let errors_in = comparison
214
+ . new_errors
215
+ . keys ( )
216
+ . map ( |k| k. as_str ( ) . to_owned ( ) )
217
+ . collect :: < Vec < _ > > ( ) ;
218
+
211
219
Some ( ComparisonSummary {
212
220
comparisons,
213
221
num_improvements,
214
222
num_regressions,
223
+ errors_in,
215
224
} )
216
225
}
217
226
@@ -351,8 +360,6 @@ impl ComparisonSummary {
351
360
}
352
361
353
362
async fn write ( & self , comparison : & Comparison ) -> String {
354
- use std:: fmt:: Write ;
355
-
356
363
let mut result = if let Some ( pr) = comparison. b . pr {
357
364
let title = github:: pr_title ( pr) . await ;
358
365
format ! (
@@ -368,20 +375,6 @@ impl ComparisonSummary {
368
375
369
376
self . write_summary_lines ( & mut result, Some ( link) ) ;
370
377
371
- if !comparison. new_errors . is_empty ( ) {
372
- write ! (
373
- result,
374
- "- New errors in {}" ,
375
- comparison
376
- . new_errors
377
- . keys( )
378
- . map( |k| k. as_str( ) )
379
- . collect:: <Vec <_>>( )
380
- . join( ", " )
381
- )
382
- . unwrap ( ) ;
383
- }
384
-
385
378
result
386
379
}
387
380
@@ -407,6 +400,15 @@ impl ComparisonSummary {
407
400
write ! ( result, "- " ) . unwrap ( ) ;
408
401
change. summary_line ( result, link)
409
402
}
403
+
404
+ if !self . errors_in . is_empty ( ) {
405
+ write ! (
406
+ result,
407
+ "- Benchmark(s) {} started failing to build" ,
408
+ self . errors_in. join( ", " )
409
+ )
410
+ . unwrap ( ) ;
411
+ }
410
412
}
411
413
}
412
414
0 commit comments