@@ -124,7 +124,10 @@ pub async fn handle_compare(
124124 } )
125125 . collect ( ) ;
126126
127- let mut new_errors = comparison. new_errors . into_iter ( ) . collect :: < Vec < _ > > ( ) ;
127+ let mut new_errors = comparison
128+ . newly_failed_benchmarks
129+ . into_iter ( )
130+ . collect :: < Vec < _ > > ( ) ;
128131 new_errors. sort ( ) ;
129132 Ok ( api:: comparison:: Response {
130133 prev,
@@ -171,8 +174,6 @@ pub struct ComparisonSummary {
171174 num_improvements : usize ,
172175 /// The cached number of comparisons that are regressions
173176 num_regressions : usize ,
174- /// Which benchmarks had errors
175- errors_in : Vec < String > ,
176177}
177178
178179impl ComparisonSummary {
@@ -206,13 +207,10 @@ impl ComparisonSummary {
206207 } ;
207208 comparisons. sort_by ( cmp) ;
208209
209- let errors_in = comparison. new_errors . keys ( ) . cloned ( ) . collect :: < Vec < _ > > ( ) ;
210-
211210 Some ( ComparisonSummary {
212211 comparisons,
213212 num_improvements,
214213 num_regressions,
215- errors_in,
216214 } )
217215 }
218216
@@ -221,7 +219,6 @@ impl ComparisonSummary {
221219 comparisons : vec ! [ ] ,
222220 num_improvements : 0 ,
223221 num_regressions : 0 ,
224- errors_in : vec ! [ ] ,
225222 }
226223 }
227224
@@ -318,10 +315,6 @@ impl ComparisonSummary {
318315 self . comparisons . is_empty ( )
319316 }
320317
321- pub fn errors_in ( & self ) -> & [ String ] {
322- & self . errors_in
323- }
324-
325318 fn arithmetic_mean < ' a > (
326319 & ' a self ,
327320 changes : impl Iterator < Item = & ' a TestResultComparison > ,
@@ -606,7 +599,7 @@ async fn compare_given_commits(
606599 a : ArtifactDescription :: for_artifact ( & * conn, a. clone ( ) , master_commits) . await ,
607600 b : ArtifactDescription :: for_artifact ( & * conn, b. clone ( ) , master_commits) . await ,
608601 statistics,
609- new_errors : errors_in_b. into_iter ( ) . collect ( ) ,
602+ newly_failed_benchmarks : errors_in_b. into_iter ( ) . collect ( ) ,
610603 } ) )
611604}
612605
@@ -754,7 +747,7 @@ pub struct Comparison {
754747 /// Statistics based on test case
755748 pub statistics : HashSet < TestResultComparison > ,
756749 /// A map from benchmark name to an error which occured when building `b` but not `a`.
757- pub new_errors : HashMap < String , String > ,
750+ pub newly_failed_benchmarks : HashMap < String , String > ,
758751}
759752
760753impl Comparison {
@@ -797,21 +790,21 @@ impl Comparison {
797790 . partition ( |s| category_map. get ( & s. benchmark ( ) ) == Some ( & Category :: Primary ) ) ;
798791
799792 let ( primary_errors, secondary_errors) = self
800- . new_errors
793+ . newly_failed_benchmarks
801794 . into_iter ( )
802795 . partition ( |( b, _) | category_map. get ( & b. as_str ( ) . into ( ) ) == Some ( & Category :: Primary ) ) ;
803796
804797 let primary = Comparison {
805798 a : self . a . clone ( ) ,
806799 b : self . b . clone ( ) ,
807800 statistics : primary,
808- new_errors : primary_errors,
801+ newly_failed_benchmarks : primary_errors,
809802 } ;
810803 let secondary = Comparison {
811804 a : self . a ,
812805 b : self . b ,
813806 statistics : secondary,
814- new_errors : secondary_errors,
807+ newly_failed_benchmarks : secondary_errors,
815808 } ;
816809 (
817810 ComparisonSummary :: summarize_comparison ( & primary) ,
@@ -1501,7 +1494,7 @@ mod tests {
15011494 bootstrap_total : 0 ,
15021495 } ,
15031496 statistics,
1504- new_errors : Default :: default ( ) ,
1497+ newly_failed_benchmarks : Default :: default ( ) ,
15051498 } ;
15061499 ComparisonSummary :: summarize_comparison ( & comparison)
15071500 . unwrap_or_else ( || ComparisonSummary :: empty ( ) )
0 commit comments