Skip to content

Commit 3d46da4

Browse files
Log preparation times
Getting these into the database would take more hassle and this is enough for our logs to show the data. This will help us decide whether to invest in moving preparation to be done in parallel across many benchmarks or perhaps even in advance on a separate machine. Both of those are quite a bit of refactoring, so we should figure out if they're worth it first.
1 parent 57c20d9 commit 3d46da4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

collector/src/benchmark/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ impl Benchmark {
248248
// to do this in Cargo today. We would also ideally build in the same
249249
// target directory, but that's also not possible, as Cargo takes a
250250
// target-directory global lock during compilation.
251+
let preparation_start = std::time::Instant::now();
251252
std::thread::scope::<_, anyhow::Result<()>>(|s| {
252253
let server = jobserver::Client::new(num_cpus::get()).context("jobserver::new")?;
253254
let mut threads = Vec::with_capacity(profile_dirs.len());
@@ -273,6 +274,11 @@ impl Benchmark {
273274

274275
Ok(())
275276
})?;
277+
log::trace!(
278+
"preparing {} took {} seconds",
279+
self.name,
280+
preparation_start.elapsed().as_secs()
281+
);
276282

277283
for (profile, prep_dir) in profile_dirs {
278284
eprintln!("Running {}: {:?} + {:?}", self.name, profile, scenarios);

0 commit comments

Comments
 (0)