Skip to content

Commit

Permalink
Meow
Browse files Browse the repository at this point in the history
  • Loading branch information
blyxyas committed Nov 14, 2023
1 parent eeeb8d8 commit 931f5aa
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions collector/src/compile/benchmark/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,20 @@ impl Benchmark {
cargo_args.push(format!("-j{}", count));
}

if let Some(zthreads) = std::env::var("RUSTC_PERF_ZTHREADS")
let mut rustc_args: Vec<String> = self
.config
.cargo_rustc_opts
.clone()
.unwrap_or_default()
.split_whitespace()
.map(String::from)
.collect();

if let Some(zthreads) = std::env::var("ZTHREADS")
.ok()
.and_then(|v| v.parse::<usize>().ok())
{
cargo_args.push(format!("-Zthreads {}", zthreads))
rustc_args.push(format!("-Zthreads={}", zthreads));
}

CargoProcess {
Expand All @@ -213,14 +222,7 @@ impl Benchmark {
.clone()
.unwrap_or_else(|| String::from("Cargo.toml")),
cargo_args,
rustc_args: self
.config
.cargo_rustc_opts
.clone()
.unwrap_or_default()
.split_whitespace()
.map(String::from)
.collect(),
rustc_args,
touch_file: self.config.touch_file.clone(),
jobserver: None,
}
Expand All @@ -234,7 +236,6 @@ impl Benchmark {
scenarios: &[Scenario],
toolchain: &Toolchain,
iterations: Option<usize>,
zthreads: usize
) -> anyhow::Result<()> {
if self.config.disabled {
eprintln!("Skipping {}: disabled", self.name);
Expand Down Expand Up @@ -299,9 +300,6 @@ impl Benchmark {
let mut threads = Vec::with_capacity(profile_dirs.len());
for (profile, prep_dir) in &profile_dirs {
let server = server.clone();
if zthreads > 0 {

}
let thread = s.spawn::<_, anyhow::Result<()>>(move || {
wait_for_future(
self.mk_cargo_process(toolchain, prep_dir.path(), *profile)
Expand Down

0 comments on commit 931f5aa

Please sign in to comment.