Skip to content

Commit 9604cd9

Browse files
committed
archive build stats for all configs
1 parent d80ae63 commit 9604cd9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/compile_time.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ impl Metrics for CompileTime {
3030
fn prepare(&self) {
3131
let command = format!("cargo build --release --example {}", self.example_name);
3232
let sh = Shell::new().unwrap();
33+
let json = format!("build-{}.json", self.nb_jobs);
3334
cmd!(
3435
sh,
35-
"hyperfine --export-json build.json --prepare 'cargo clean; sleep 2' {command}"
36+
"hyperfine --export-json {json} --prepare 'cargo clean; sleep 2' {command}"
3637
)
3738
.run()
3839
.unwrap();
@@ -41,7 +42,7 @@ impl Metrics for CompileTime {
4142
fn artifacts(&self) -> HashMap<String, PathBuf> {
4243
HashMap::from([(
4344
"compile-time.stats".to_string(),
44-
Path::new("build.json").to_path_buf(),
45+
Path::new(&format!("build-{}.json", self.nb_jobs)).to_path_buf(),
4546
)])
4647
}
4748

0 commit comments

Comments
 (0)