File tree 1 file changed +18
-15
lines changed
collector/src/compile/execute
1 file changed +18
-15
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,9 @@ impl<'a> BenchProcessor<'a> {
97
97
CodegenBackend :: Cranelift => database:: CodegenBackend :: Cranelift ,
98
98
} ;
99
99
100
+ // If the gathered metrics were produced with self profile enabled, then they are not
101
+ // realistic. Do not store the metrics into the DB for self-profile runs to avoid unnecessary
102
+ // DB storage.
100
103
if let Some ( files) = stats. 2 {
101
104
if env:: var_os ( "RUSTC_PERF_UPLOAD_TO_S3" ) . is_some ( ) {
102
105
// FIXME: Record codegen backend in the self profile name
@@ -128,23 +131,23 @@ impl<'a> BenchProcessor<'a> {
128
131
)
129
132
. await ;
130
133
}
131
- }
134
+ } else {
135
+ let mut buf = FuturesUnordered :: new ( ) ;
136
+ for ( stat, value) in stats. 0 . iter ( ) {
137
+ buf. push ( self . conn . record_statistic (
138
+ collection,
139
+ self . artifact_row_id ,
140
+ self . benchmark . 0 . as_str ( ) ,
141
+ profile,
142
+ scenario,
143
+ backend,
144
+ stat,
145
+ value,
146
+ ) ) ;
147
+ }
132
148
133
- let mut buf = FuturesUnordered :: new ( ) ;
134
- for ( stat, value) in stats. 0 . iter ( ) {
135
- buf. push ( self . conn . record_statistic (
136
- collection,
137
- self . artifact_row_id ,
138
- self . benchmark . 0 . as_str ( ) ,
139
- profile,
140
- scenario,
141
- backend,
142
- stat,
143
- value,
144
- ) ) ;
149
+ while let Some ( ( ) ) = buf. next ( ) . await { }
145
150
}
146
-
147
- while let Some ( ( ) ) = buf. next ( ) . await { }
148
151
}
149
152
150
153
pub async fn measure_rustc ( & mut self , toolchain : & Toolchain ) -> anyhow:: Result < ( ) > {
You can’t perform that action at this time.
0 commit comments