Skip to content

Commit f81d441

Browse files
authored
Merge pull request #2321 from Kobzol/release-fix
Fix benchmarking of stable/beta releases
2 parents ecc9578 + a87f2c5 commit f81d441

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

collector/src/bin/collector.rs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1803,6 +1803,21 @@ async fn create_benchmark_configs(
18031803
}
18041804
}
18051805

1806+
let is_release = match artifact_id {
1807+
ArtifactId::Commit(_) => false,
1808+
ArtifactId::Tag(_) => true,
1809+
};
1810+
if is_release {
1811+
bench_rustc = false;
1812+
bench_compile_benchmarks.retain(|benchmark| {
1813+
all_compile_benchmarks
1814+
.iter()
1815+
.find(|b| b.name == *benchmark)
1816+
.map(|b| b.category().is_stable())
1817+
.unwrap_or(false)
1818+
});
1819+
}
1820+
18061821
let compile_config = if bench_rustc || !bench_compile_benchmarks.is_empty() {
18071822
Some(CompileBenchmarkConfig {
18081823
benchmarks: all_compile_benchmarks
@@ -1813,8 +1828,8 @@ async fn create_benchmark_configs(
18131828
profiles: vec![job.profile().into()],
18141829
scenarios: Scenario::all(),
18151830
backends: vec![job.backend().into()],
1816-
iterations: None,
1817-
is_self_profile: true,
1831+
iterations: if is_release { Some(3) } else { None },
1832+
is_self_profile: !is_release,
18181833
bench_rustc,
18191834
targets: vec![job.target().into()],
18201835
})

0 commit comments

Comments
 (0)