@@ -957,10 +957,10 @@ impl BenchmarkRequest {
957
957
}
958
958
}
959
959
960
- pub fn pr ( & self ) -> Option < & u32 > {
960
+ pub fn pr ( & self ) -> Option < u32 > {
961
961
match & self . commit_type {
962
962
BenchmarkRequestType :: Try { pr, .. } | BenchmarkRequestType :: Master { pr, .. } => {
963
- Some ( pr)
963
+ Some ( * pr)
964
964
}
965
965
BenchmarkRequestType :: Release { .. } => None ,
966
966
}
@@ -986,6 +986,10 @@ impl BenchmarkRequest {
986
986
self . commit_date
987
987
}
988
988
989
+ pub fn commit_type ( & self ) -> & BenchmarkRequestType {
990
+ & self . commit_type
991
+ }
992
+
989
993
pub fn is_master ( & self ) -> bool {
990
994
matches ! ( self . commit_type, BenchmarkRequestType :: Master { .. } )
991
995
}
@@ -1248,12 +1252,9 @@ pub struct InProgressRequestWithJobs {
1248
1252
pub parent : Option < ( BenchmarkRequest , Vec < BenchmarkJob > ) > ,
1249
1253
}
1250
1254
1251
- /// The data that can be retrived from the database directly to populate the
1252
- /// status page
1253
1255
#[ derive( Debug , PartialEq ) ]
1254
- pub struct PartialStatusPageData {
1255
- /// A Vector of; completed requests with any associated errors
1256
- pub completed_requests : Vec < ( BenchmarkRequest , Vec < String > ) > ,
1257
- /// In progress requests along with their associated jobs
1258
- pub in_progress : Vec < InProgressRequestWithJobs > ,
1256
+ pub struct BenchmarkRequestWithErrors {
1257
+ pub request : BenchmarkRequest ,
1258
+ /// Benchmark (name) -> error
1259
+ pub errors : HashMap < String , String > ,
1259
1260
}
0 commit comments