Skip to content

Commit 6ef4724

Browse files
Switch to j2/t3, but 3 runs
This should hopefully balance out to roughly the same total benchmarking time while improving determinism a bit (by minimizing across more runs).
1 parent 965ad78 commit 6ef4724

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

collector/src/bootstrap-rustc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::env;
33
use std::process::Command;
44

55
fn run() -> i32 {
6-
let server = Client::new(num_cpus::get_physical() / 2).expect("made jobserver");
6+
let server = Client::new(num_cpus::get_physical() / 3).expect("made jobserver");
77

88
let mut cmd = Command::new(env::var_os("RUSTC_PERF_REAL_RUSTC").unwrap());
99
cmd.args(env::args_os().skip(1));

collector/src/execute/rustc.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,9 @@ pub fn measure(
2424
) -> anyhow::Result<()> {
2525
checkout().context("checking out rust-lang/rust")?;
2626

27-
// Run the compiler twice -- we'll call min(duration) on each crate later
28-
// on. This should (hopefully) reduce variance. It's also a 2x bump in
29-
// compile times, but we can afford the extra 6 minutes (presuming it
30-
// actually benefits us).
27+
// Run the compiler multiple times -- we'll call min(duration) on each crate
28+
// later on. This should (hopefully) reduce variance.
29+
record(rt, conn, compiler, artifact, aid)?;
3130
record(rt, conn, compiler, artifact, aid)?;
3231
record(rt, conn, compiler, artifact, aid)?;
3332

@@ -100,9 +99,9 @@ fn record(
10099
.arg("0")
101100
// We want bootstrap and the Cargos it spawns to have no parallelism --
102101
// if multiple rustcs are competing for jobserver tokens, we introduce
103-
// quite a bit of variance. Instead, we configure -j1 here, and then
104-
// full all vCPU parallelism for each rustc.
105-
.arg("-j2")
102+
// quite a bit of variance. Instead, we configure -j3 here, and then
103+
// 1/3 all vCPU parallelism for each rustc.
104+
.arg("-j3")
106105
.arg("compiler/rustc"),
107106
)
108107
.context("building rustc")?;

0 commit comments

Comments
 (0)