Skip to content

Commit cbb18b4

Browse files
committed
Store artifact size metrics from self-profile into the DB
This was broken by a previous commit that removed storing of all self-profile data from the DB.
1 parent 8b21652 commit cbb18b4

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

collector/src/compile/execute/bencher.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,21 +184,24 @@ impl<'a> Processor for BenchProcessor<'a> {
184184
let version = get_rustc_perf_commit();
185185
let collection = self.conn.collection_id(&version).await;
186186

187-
// If the gathered metrics were produced with self profile enabled, then they
188-
// are not realistic. Do not store the metrics into the DB for self-profile
189-
// runs to avoid unnecessary DB storage.
190187
if let Some(files) = res.2 {
191188
self.self_profiles.push(RecordedSelfProfile {
192189
collection,
193190
scenario,
194191
profile,
195192
files,
196193
});
197-
} else {
198-
self.insert_stats(collection, scenario, profile, data.backend, res.0)
199-
.await;
194+
195+
// If the gathered metrics were produced with self profile enabled, then they
196+
// are not realistic. Do not store the metrics that are affected by
197+
// self-profiling into the DB for self-profile runs to avoid unnecessary
198+
// DB storage.
199+
res.0.stats.retain(|key, _| key.starts_with("size:"));
200200
}
201201

202+
self.insert_stats(collection, scenario, profile, data.backend, res.0)
203+
.await;
204+
202205
Ok(Retry::No)
203206
}
204207
Err(DeserializeStatError::NoOutput(output)) => {

0 commit comments

Comments
 (0)