@@ -1065,13 +1065,18 @@ pub enum BenchmarkJobStatus {
1065
1065
Failure ,
1066
1066
}
1067
1067
1068
+ const BENCHMARK_JOB_STATUS_QUEUED_STR : & str = "queued" ;
1069
+ const BENCHMARK_JOB_STATUS_IN_PROGRESS_STR : & str = "in_progress" ;
1070
+ const BENCHMARK_JOB_STATUS_SUCCESS_STR : & str = "success" ;
1071
+ const BENCHMARK_JOB_STATUS_FAILURE_STR : & str = "failure" ;
1072
+
1068
1073
impl BenchmarkJobStatus {
1069
1074
pub fn as_str ( & self ) -> & str {
1070
1075
match self {
1071
- BenchmarkJobStatus :: Queued => "queued" ,
1072
- BenchmarkJobStatus :: InProgress => "in_progress" ,
1073
- BenchmarkJobStatus :: Success => "success" ,
1074
- BenchmarkJobStatus :: Failure => "failure" ,
1076
+ BenchmarkJobStatus :: Queued => BENCHMARK_JOB_STATUS_QUEUED_STR ,
1077
+ BenchmarkJobStatus :: InProgress => BENCHMARK_JOB_STATUS_IN_PROGRESS_STR ,
1078
+ BenchmarkJobStatus :: Success => BENCHMARK_JOB_STATUS_SUCCESS_STR ,
1079
+ BenchmarkJobStatus :: Failure => BENCHMARK_JOB_STATUS_FAILURE_STR ,
1075
1080
}
1076
1081
}
1077
1082
}
@@ -1084,15 +1089,15 @@ impl fmt::Display for BenchmarkJobStatus {
1084
1089
1085
1090
#[ derive( Debug , Clone , PartialEq ) ]
1086
1091
pub struct BenchmarkJob {
1087
- pub target : Target ,
1088
- pub backend : CodegenBackend ,
1089
- pub benchmark_set : u32 ,
1090
- pub collector_id : String ,
1091
- pub created_at : Option < DateTime < Utc > > ,
1092
- pub started_at : Option < DateTime < Utc > > ,
1093
- pub completed_at : Option < DateTime < Utc > > ,
1094
- pub status : BenchmarkJobStatus ,
1095
- pub retry : u32 ,
1092
+ target : Target ,
1093
+ backend : CodegenBackend ,
1094
+ benchmark_set : u32 ,
1095
+ collector_id : String ,
1096
+ created_at : Option < DateTime < Utc > > ,
1097
+ started_at : Option < DateTime < Utc > > ,
1098
+ completed_at : Option < DateTime < Utc > > ,
1099
+ status : BenchmarkJobStatus ,
1100
+ retry : u32 ,
1096
1101
}
1097
1102
1098
1103
impl BenchmarkJob {
0 commit comments