@@ -45,11 +45,11 @@ pub async fn handle_triage(
45
45
let mut before = start. clone ( ) ;
46
46
47
47
let mut num_comparisons = 0 ;
48
- let stat = Stat :: Instructions ;
48
+ let metric = Metric :: Instructions ;
49
49
let benchmark_map = ctxt. get_benchmark_category_map ( ) . await ;
50
50
loop {
51
51
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)
53
53
. await
54
54
. map_err ( |e| format ! ( "error comparing commits: {}" , e) ) ?
55
55
{
@@ -86,7 +86,7 @@ pub async fn handle_triage(
86
86
87
87
// Summarize the entire triage from start commit to end commit
88
88
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)
90
90
. await
91
91
. map_err ( |e| format ! ( "error comparing beginning and ending commits: {}" , e) ) ?
92
92
{
@@ -181,7 +181,7 @@ async fn populate_report(
181
181
}
182
182
183
183
#[ derive( Copy , Clone , Debug , PartialEq , Serialize , Deserialize ) ]
184
- pub enum Stat {
184
+ pub enum Metric {
185
185
#[ serde( rename = "instructions:u" ) ]
186
186
Instructions ,
187
187
#[ serde( rename = "cycles:u" ) ]
@@ -198,7 +198,7 @@ pub enum Stat {
198
198
CpuClock ,
199
199
}
200
200
201
- impl Stat {
201
+ impl Metric {
202
202
pub fn as_str ( & self ) -> & ' static str {
203
203
match self {
204
204
Self :: Instructions => "instructions:u" ,
@@ -586,19 +586,19 @@ pub fn write_summary_table_footer(result: &mut String) {
586
586
pub async fn compare (
587
587
start : Bound ,
588
588
end : Bound ,
589
- stat : Stat ,
589
+ metric : Metric ,
590
590
ctxt : & SiteCtxt ,
591
591
) -> Result < Option < ArtifactComparison > , BoxedError > {
592
592
let master_commits = & ctxt. get_master_commits ( ) . commits ;
593
593
594
- compare_given_commits ( start, end, stat , ctxt, master_commits) . await
594
+ compare_given_commits ( start, end, metric , ctxt, master_commits) . await
595
595
}
596
596
597
- /// Compare two bounds on a given stat
597
+ /// Compare two bounds on a given metric
598
598
async fn compare_given_commits (
599
599
start : Bound ,
600
600
end : Bound ,
601
- stat : Stat ,
601
+ metric : Metric ,
602
602
ctxt : & SiteCtxt ,
603
603
master_commits : & [ collector:: MasterCommit ] ,
604
604
) -> Result < Option < ArtifactComparison > , BoxedError > {
@@ -612,12 +612,12 @@ async fn compare_given_commits(
612
612
} ;
613
613
let aids = Arc :: new ( vec ! [ a. clone( ) , b. clone( ) ] ) ;
614
614
615
- // get all crates, cache, and profile combinations for the given stat
615
+ // get all crates, cache, and profile combinations for the given metric
616
616
let query = selector:: Query :: new ( )
617
617
. set :: < String > ( Tag :: Benchmark , selector:: Selector :: All )
618
618
. set :: < String > ( Tag :: Scenario , selector:: Selector :: All )
619
619
. 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 ( ) ) ) ;
621
621
622
622
// `responses` contains series iterators. The first element in the iterator is the data
623
623
// for `a` and the second is the data for `b`
@@ -628,7 +628,7 @@ async fn compare_given_commits(
628
628
let statistics_for_b = statistics_from_series ( & mut responses) ;
629
629
630
630
let mut historical_data =
631
- HistoricalDataMap :: calculate ( ctxt, a. clone ( ) , master_commits, stat ) . await ?;
631
+ HistoricalDataMap :: calculate ( ctxt, a. clone ( ) , master_commits, metric ) . await ?;
632
632
let comparisons = statistics_for_a
633
633
. into_iter ( )
634
634
. filter_map ( |( test_case, a) | {
@@ -864,7 +864,7 @@ impl HistoricalDataMap {
864
864
ctxt : & SiteCtxt ,
865
865
from : ArtifactId ,
866
866
master_commits : & [ collector:: MasterCommit ] ,
867
- stat : Stat ,
867
+ metric : Metric ,
868
868
) -> Result < Self , BoxedError > {
869
869
let mut historical_data = HashMap :: new ( ) ;
870
870
@@ -881,12 +881,12 @@ impl HistoricalDataMap {
881
881
} ) ;
882
882
}
883
883
884
- // get all crates, cache, and profile combinations for the given stat
884
+ // get all crates, cache, and profile combinations for the given metric
885
885
let query = selector:: Query :: new ( )
886
886
. set :: < String > ( Tag :: Benchmark , selector:: Selector :: All )
887
887
. set :: < String > ( Tag :: Scenario , selector:: Selector :: All )
888
888
. 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 ( ) ) ) ;
890
890
891
891
let mut previous_commit_series = ctxt
892
892
. statistic_series ( query, previous_commits. clone ( ) )
0 commit comments