Skip to content

Commit 86b918e

Browse files
committed
Do not enqueue rustc job for release benchmark requests
1 parent d729dd7 commit 86b918e

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

collector/src/bin/collector.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1804,7 +1804,8 @@ async fn create_benchmark_configs(
18041804
}
18051805
}
18061806
database::BenchmarkJobKind::Rustc => {
1807-
bench_rustc = !is_release;
1807+
assert!(!is_release, "Release job should not benchmark rustc");
1808+
bench_rustc = true;
18081809
}
18091810
}
18101811

site/src/job_queue/mod.rs

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -361,21 +361,24 @@ pub async fn enqueue_benchmark_request(
361361
.await?;
362362
}
363363

364-
// Enqueue Rustc job for only for x86_64 & llvm. This benchmark is how long
365-
// it takes to build the rust compiler. It takes a while to run and is
366-
// assumed that if the compilation of other rust project improve then this
367-
// too would improve.
368-
enqueue_job(
369-
&mut tx,
370-
request_tag,
371-
Target::X86_64UnknownLinuxGnu,
372-
CodegenBackend::Llvm,
373-
Profile::Opt,
374-
0u32,
375-
BenchmarkJobKind::Rustc,
376-
EnqueueMode::Commit,
377-
)
378-
.await?;
364+
// Enqueue Rustc job only for x86_64 & LLVM, and if we're not benchmarking a release commit.
365+
// This benchmark measures how long it takes to build the rust compiler.
366+
match request.commit_type() {
367+
BenchmarkRequestType::Try { .. } | BenchmarkRequestType::Master { .. } => {
368+
enqueue_job(
369+
&mut tx,
370+
request_tag,
371+
Target::X86_64UnknownLinuxGnu,
372+
CodegenBackend::Llvm,
373+
Profile::Opt,
374+
0u32,
375+
BenchmarkJobKind::Rustc,
376+
EnqueueMode::Commit,
377+
)
378+
.await?;
379+
}
380+
BenchmarkRequestType::Release { .. } => {}
381+
}
379382

380383
tx.conn()
381384
.update_benchmark_request_status(request_tag, BenchmarkRequestStatus::InProgress)

0 commit comments

Comments
 (0)