Skip to content

Commit dd579ad

Browse files
Merge pull request #1559 from Mark-Simulacrum/preparation-timing
Log preparation times
2 parents 57c20d9 + 3d46da4 commit dd579ad

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)