@@ -45,11 +45,11 @@ pub async fn handle_triage(
4545 let mut before = start. clone ( ) ;
4646
4747 let mut num_comparisons = 0 ;
48- let stat = Stat :: Instructions ;
48+ let metric = Metric :: Instructions ;
4949 let benchmark_map = ctxt. get_benchmark_category_map ( ) . await ;
5050 loop {
5151 let comparison =
52- match compare_given_commits ( before, next. clone ( ) , stat , ctxt, & master_commits)
52+ match compare_given_commits ( before, next. clone ( ) , metric , ctxt, & master_commits)
5353 . await
5454 . map_err ( |e| format ! ( "error comparing commits: {}" , e) ) ?
5555 {
@@ -86,7 +86,7 @@ pub async fn handle_triage(
8686
8787 // Summarize the entire triage from start commit to end commit
8888 let summary =
89- match compare_given_commits ( start. clone ( ) , end. clone ( ) , stat , ctxt, master_commits)
89+ match compare_given_commits ( start. clone ( ) , end. clone ( ) , metric , ctxt, master_commits)
9090 . await
9191 . map_err ( |e| format ! ( "error comparing beginning and ending commits: {}" , e) ) ?
9292 {
@@ -181,7 +181,7 @@ async fn populate_report(
181181}
182182
183183#[ derive( Copy , Clone , Debug , PartialEq , Serialize , Deserialize ) ]
184- pub enum Stat {
184+ pub enum Metric {
185185 #[ serde( rename = "instructions:u" ) ]
186186 Instructions ,
187187 #[ serde( rename = "cycles:u" ) ]
@@ -198,7 +198,7 @@ pub enum Stat {
198198 CpuClock ,
199199}
200200
201- impl Stat {
201+ impl Metric {
202202 pub fn as_str ( & self ) -> & ' static str {
203203 match self {
204204 Self :: Instructions => "instructions:u" ,
@@ -586,19 +586,19 @@ pub fn write_summary_table_footer(result: &mut String) {
586586pub async fn compare (
587587 start : Bound ,
588588 end : Bound ,
589- stat : Stat ,
589+ metric : Metric ,
590590 ctxt : & SiteCtxt ,
591591) -> Result < Option < ArtifactComparison > , BoxedError > {
592592 let master_commits = & ctxt. get_master_commits ( ) . commits ;
593593
594- compare_given_commits ( start, end, stat , ctxt, master_commits) . await
594+ compare_given_commits ( start, end, metric , ctxt, master_commits) . await
595595}
596596
597- /// Compare two bounds on a given stat
597+ /// Compare two bounds on a given metric
598598async fn compare_given_commits (
599599 start : Bound ,
600600 end : Bound ,
601- stat : Stat ,
601+ metric : Metric ,
602602 ctxt : & SiteCtxt ,
603603 master_commits : & [ collector:: MasterCommit ] ,
604604) -> Result < Option < ArtifactComparison > , BoxedError > {
@@ -612,12 +612,12 @@ async fn compare_given_commits(
612612 } ;
613613 let aids = Arc :: new ( vec ! [ a. clone( ) , b. clone( ) ] ) ;
614614
615- // get all crates, cache, and profile combinations for the given stat
615+ // get all crates, cache, and profile combinations for the given metric
616616 let query = selector:: Query :: new ( )
617617 . set :: < String > ( Tag :: Benchmark , selector:: Selector :: All )
618618 . set :: < String > ( Tag :: Scenario , selector:: Selector :: All )
619619 . set :: < String > ( Tag :: Profile , selector:: Selector :: All )
620- . set ( Tag :: Metric , selector:: Selector :: One ( stat . as_str ( ) ) ) ;
620+ . set ( Tag :: Metric , selector:: Selector :: One ( metric . as_str ( ) ) ) ;
621621
622622 // `responses` contains series iterators. The first element in the iterator is the data
623623 // for `a` and the second is the data for `b`
@@ -628,7 +628,7 @@ async fn compare_given_commits(
628628 let statistics_for_b = statistics_from_series ( & mut responses) ;
629629
630630 let mut historical_data =
631- HistoricalDataMap :: calculate ( ctxt, a. clone ( ) , master_commits, stat ) . await ?;
631+ HistoricalDataMap :: calculate ( ctxt, a. clone ( ) , master_commits, metric ) . await ?;
632632 let comparisons = statistics_for_a
633633 . into_iter ( )
634634 . filter_map ( |( test_case, a) | {
@@ -864,7 +864,7 @@ impl HistoricalDataMap {
864864 ctxt : & SiteCtxt ,
865865 from : ArtifactId ,
866866 master_commits : & [ collector:: MasterCommit ] ,
867- stat : Stat ,
867+ metric : Metric ,
868868 ) -> Result < Self , BoxedError > {
869869 let mut historical_data = HashMap :: new ( ) ;
870870
@@ -881,12 +881,12 @@ impl HistoricalDataMap {
881881 } ) ;
882882 }
883883
884- // get all crates, cache, and profile combinations for the given stat
884+ // get all crates, cache, and profile combinations for the given metric
885885 let query = selector:: Query :: new ( )
886886 . set :: < String > ( Tag :: Benchmark , selector:: Selector :: All )
887887 . set :: < String > ( Tag :: Scenario , selector:: Selector :: All )
888888 . set :: < String > ( Tag :: Profile , selector:: Selector :: All )
889- . set ( Tag :: Metric , selector:: Selector :: One ( stat . as_str ( ) ) ) ;
889+ . set ( Tag :: Metric , selector:: Selector :: One ( metric . as_str ( ) ) ) ;
890890
891891 let mut previous_commit_series = ctxt
892892 . statistic_series ( query, previous_commits. clone ( ) )
0 commit comments