@@ -1027,13 +1027,18 @@ pub enum BenchmarkJobStatus {
1027
1027
Failure ,
1028
1028
}
1029
1029
1030
+ const BENCHMARK_JOB_STATUS_QUEUED_STR : & str = "queued" ;
1031
+ const BENCHMARK_JOB_STATUS_IN_PROGRESS_STR : & str = "in_progress" ;
1032
+ const BENCHMARK_JOB_STATUS_SUCCESS_STR : & str = "success" ;
1033
+ const BENCHMARK_JOB_STATUS_FAILURE_STR : & str = "failure" ;
1034
+
1030
1035
impl BenchmarkJobStatus {
1031
1036
pub fn as_str ( & self ) -> & str {
1032
1037
match self {
1033
- BenchmarkJobStatus :: Queued => "queued" ,
1034
- BenchmarkJobStatus :: InProgress => "in_progress" ,
1035
- BenchmarkJobStatus :: Success => "success" ,
1036
- BenchmarkJobStatus :: Failure => "failure" ,
1038
+ BenchmarkJobStatus :: Queued => BENCHMARK_JOB_STATUS_QUEUED_STR ,
1039
+ BenchmarkJobStatus :: InProgress => BENCHMARK_JOB_STATUS_IN_PROGRESS_STR ,
1040
+ BenchmarkJobStatus :: Success => BENCHMARK_JOB_STATUS_SUCCESS_STR ,
1041
+ BenchmarkJobStatus :: Failure => BENCHMARK_JOB_STATUS_FAILURE_STR ,
1037
1042
}
1038
1043
}
1039
1044
}
@@ -1046,15 +1051,15 @@ impl fmt::Display for BenchmarkJobStatus {
1046
1051
1047
1052
#[ derive( Debug , Clone , PartialEq ) ]
1048
1053
pub struct BenchmarkJob {
1049
- pub target : Target ,
1050
- pub backend : CodegenBackend ,
1051
- pub benchmark_set : u32 ,
1052
- pub collector_id : String ,
1053
- pub created_at : Option < DateTime < Utc > > ,
1054
- pub started_at : Option < DateTime < Utc > > ,
1055
- pub completed_at : Option < DateTime < Utc > > ,
1056
- pub status : BenchmarkJobStatus ,
1057
- pub retry : u32 ,
1054
+ target : Target ,
1055
+ backend : CodegenBackend ,
1056
+ benchmark_set : u32 ,
1057
+ collector_id : String ,
1058
+ created_at : Option < DateTime < Utc > > ,
1059
+ started_at : Option < DateTime < Utc > > ,
1060
+ completed_at : Option < DateTime < Utc > > ,
1061
+ status : BenchmarkJobStatus ,
1062
+ retry : u32 ,
1058
1063
}
1059
1064
1060
1065
impl BenchmarkJob {
0 commit comments