diff --git a/collector/src/bin/collector.rs b/collector/src/bin/collector.rs index 998158c38..c035c6c1a 100644 --- a/collector/src/bin/collector.rs +++ b/collector/src/bin/collector.rs @@ -1804,7 +1804,8 @@ async fn create_benchmark_configs( } } database::BenchmarkJobKind::Rustc => { - bench_rustc = !is_release; + assert!(!is_release, "Release job should not benchmark rustc"); + bench_rustc = true; } } diff --git a/site/src/job_queue/mod.rs b/site/src/job_queue/mod.rs index a61bddebe..25fc5f5e0 100644 --- a/site/src/job_queue/mod.rs +++ b/site/src/job_queue/mod.rs @@ -361,21 +361,24 @@ pub async fn enqueue_benchmark_request( .await?; } - // Enqueue Rustc job for only for x86_64 & llvm. This benchmark is how long - // it takes to build the rust compiler. It takes a while to run and is - // assumed that if the compilation of other rust project improve then this - // too would improve. - enqueue_job( - &mut tx, - request_tag, - Target::X86_64UnknownLinuxGnu, - CodegenBackend::Llvm, - Profile::Opt, - 0u32, - BenchmarkJobKind::Rustc, - EnqueueMode::Commit, - ) - .await?; + // Enqueue Rustc job only for x86_64 & LLVM, and if we're not benchmarking a release commit. + // This benchmark measures how long it takes to build the rust compiler. + match request.commit_type() { + BenchmarkRequestType::Try { .. } | BenchmarkRequestType::Master { .. } => { + enqueue_job( + &mut tx, + request_tag, + Target::X86_64UnknownLinuxGnu, + CodegenBackend::Llvm, + Profile::Opt, + 0u32, + BenchmarkJobKind::Rustc, + EnqueueMode::Commit, + ) + .await?; + } + BenchmarkRequestType::Release { .. } => {} + } tx.conn() .update_benchmark_request_status(request_tag, BenchmarkRequestStatus::InProgress)