File tree 2 files changed +22
-14
lines changed 2 files changed +22
-14
lines changed Original file line number Diff line number Diff line change @@ -320,6 +320,10 @@ impl ComparisonSummary {
320
320
self . comparisons . is_empty ( )
321
321
}
322
322
323
+ pub fn errors_in ( & self ) -> & [ String ] {
324
+ & self . errors_in
325
+ }
326
+
323
327
fn arithmetic_mean < ' a > (
324
328
& ' a self ,
325
329
changes : impl Iterator < Item = & ' a TestResultComparison > ,
@@ -500,20 +504,6 @@ pub fn write_summary_table(
500
504
)
501
505
. unwrap ( ) ;
502
506
503
- if !primary. errors_in . is_empty ( ) {
504
- write ! (
505
- result,
506
- "\n The following benchmark(s) failed to build:\n {}\n " ,
507
- primary
508
- . errors_in
509
- . iter( )
510
- . map( |benchmark| format!( "- {benchmark}" ) )
511
- . collect:: <Vec <_>>( )
512
- . join( "\n " )
513
- )
514
- . unwrap ( ) ;
515
- }
516
-
517
507
if with_footnotes {
518
508
writeln ! (
519
509
result,
Original file line number Diff line number Diff line change @@ -701,6 +701,24 @@ async fn categorize_benchmark(
701
701
secondary. unwrap_or_else ( || ComparisonSummary :: empty ( ) ) ,
702
702
) ;
703
703
write_summary_table ( & primary, & secondary, true , & mut result) ;
704
+
705
+ if !primary. errors_in ( ) . is_empty ( ) || !secondary. errors_in ( ) . is_empty ( ) {
706
+ let list_errored_benchmarks = |summary : ComparisonSummary | {
707
+ summary
708
+ . errors_in ( )
709
+ . iter ( )
710
+ . map ( |benchmark| format ! ( "- {benchmark}" ) )
711
+ . collect :: < Vec < _ > > ( )
712
+ . join ( "\n " )
713
+ } ;
714
+ write ! (
715
+ result,
716
+ "\n The following benchmark(s) failed to build:\n {}{}\n " ,
717
+ list_errored_benchmarks( primary) ,
718
+ list_errored_benchmarks( secondary)
719
+ )
720
+ . unwrap ( ) ;
721
+ }
704
722
}
705
723
706
724
write ! ( result, "\n {}" , DISAGREEMENT ) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments