Skip to content

Commit bf4fb35

Browse files
committed
Add function for determining the default profiles to benchmark for master/try artifacts
1 parent 2120e3b commit bf4fb35

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

collector/src/bin/collector.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,12 +1042,7 @@ fn main_result() -> anyhow::Result<i32> {
10421042

10431043
let compile_config = CompileBenchmarkConfig {
10441044
benchmarks,
1045-
profiles: vec![
1046-
Profile::Check,
1047-
Profile::Debug,
1048-
Profile::Doc,
1049-
Profile::Opt,
1050-
],
1045+
profiles: Profile::default_profiles(),
10511046
scenarios: Scenario::all(),
10521047
backends,
10531048
iterations: runs.map(|v| v as usize),

collector/src/compile/benchmark/profile.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ impl Profile {
3434
]
3535
}
3636

37+
/// Set of default profiles that should be benchmarked for a master/try artifact.
38+
pub fn default_profiles() -> Vec<Self> {
39+
vec![Profile::Check, Profile::Debug, Profile::Doc, Profile::Opt]
40+
}
41+
3742
pub fn is_doc(&self) -> bool {
3843
match self {
3944
Profile::Doc | Profile::DocJson => true,

0 commit comments

Comments
 (0)