Skip to content

Commit a0393c9

Browse files
committed
Run runtime benchmarks in BenchNext
1 parent 7436be1 commit a0393c9

File tree

1 file changed

+26
-7
lines changed

1 file changed

+26
-7
lines changed

collector/src/bin/collector.rs

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -782,23 +782,42 @@ fn main_result() -> anyhow::Result<i32> {
782782
benchmarks.retain(|b| b.category().is_primary_or_secondary());
783783

784784
let artifact_id = ArtifactId::Commit(commit);
785-
let conn = rt.block_on(pool.connection());
785+
let mut conn = rt.block_on(pool.connection());
786786
let toolchain = Toolchain::from_sysroot(&sysroot, sha);
787787

788-
let shared = SharedBenchmarkConfig {
789-
artifact_id,
790-
toolchain,
791-
};
792-
let config = CompileBenchmarkConfig {
788+
let compile_config = CompileBenchmarkConfig {
793789
benchmarks,
794790
profiles: Profile::all(),
795791
scenarios: Scenario::all(),
796792
iterations: runs.map(|v| v as usize),
797793
is_self_profile: self_profile.self_profile,
798794
bench_rustc: bench_rustc.bench_rustc,
799795
};
796+
let runtime_suite = rt.block_on(load_runtime_benchmarks(
797+
conn.as_mut(),
798+
&runtime_benchmark_dir,
799+
CargoIsolationMode::Isolated,
800+
&toolchain,
801+
&artifact_id,
802+
))?;
800803

801-
let res = run_benchmarks(&mut rt, conn, shared, Some(config), None);
804+
let runtime_config = RuntimeBenchmarkConfig {
805+
runtime_suite,
806+
filter: BenchmarkFilter::keep_all(),
807+
iterations: DEFAULT_RUNTIME_ITERATIONS,
808+
};
809+
let shared = SharedBenchmarkConfig {
810+
artifact_id,
811+
toolchain,
812+
};
813+
814+
let res = run_benchmarks(
815+
&mut rt,
816+
conn,
817+
shared,
818+
Some(compile_config),
819+
Some(runtime_config),
820+
);
802821

803822
client.post(format!("{}/perf/onpush", site_url)).send()?;
804823

0 commit comments

Comments
 (0)