@@ -35,6 +35,9 @@ pub async fn handle_triage(
35
35
let start_artifact = ctxt
36
36
. artifact_id_for_bound ( start. clone ( ) , true )
37
37
. ok_or ( format ! ( "could not find start commit for bound {:?}" , start) ) ?;
38
+ let end_artifact = ctxt
39
+ . artifact_id_for_bound ( end. clone ( ) , false )
40
+ . ok_or ( format ! ( "could not find end commit for bound {:?}" , end) ) ?;
38
41
// This gives a better error, but is still not great -- the common case here
39
42
// is that we've had a 422 error and as such had a fork. It's possible we
40
43
// could diagnose that and give a nicer error here telling the user which
@@ -49,8 +52,6 @@ pub async fn handle_triage(
49
52
let mut num_comparisons = 0 ;
50
53
let metric = Metric :: InstructionsUser ;
51
54
let benchmark_map = ctxt. get_benchmark_category_map ( ) . await ;
52
- // Track whether we are on the known last iteration
53
- let mut last_iteration = false ;
54
55
55
56
let end = loop {
56
57
let comparison = match compare_given_commits (
@@ -83,7 +84,7 @@ pub async fn handle_triage(
83
84
populate_report ( & comparison, & benchmark_map, & mut report) . await ;
84
85
85
86
// If we already know this is the last iteration, we can stop
86
- if last_iteration {
87
+ if comparison . b . artifact == end_artifact {
87
88
break before;
88
89
}
89
90
@@ -93,8 +94,6 @@ pub async fn handle_triage(
93
94
// We keep doing comparisons...
94
95
Some ( n) => {
95
96
before = next;
96
- // The next iteration is the last if the next bound is equal to the end bound
97
- last_iteration = n != end;
98
97
next = n;
99
98
}
100
99
// There is no next commit so we stop.
0 commit comments