@@ -88,6 +88,16 @@ struct RuntimeBenchmarkConfig {
8888 iterations : u32 ,
8989}
9090
91+ impl RuntimeBenchmarkConfig {
92+ fn new ( suite : BenchmarkSuite , filter : BenchmarkFilter , iterations : u32 ) -> Self {
93+ Self {
94+ runtime_suite : suite. filter ( & filter) ,
95+ filter,
96+ iterations,
97+ }
98+ }
99+ }
100+
91101struct SharedBenchmarkConfig {
92102 artifact_id : ArtifactId ,
93103 toolchain : Toolchain ,
@@ -671,11 +681,11 @@ fn main_result() -> anyhow::Result<i32> {
671681 artifact_id,
672682 toolchain,
673683 } ;
674- let config = RuntimeBenchmarkConfig {
684+ let config = RuntimeBenchmarkConfig :: new (
675685 runtime_suite,
676- filter : BenchmarkFilter :: new ( local. exclude , local. include ) ,
686+ BenchmarkFilter :: new ( local. exclude , local. include ) ,
677687 iterations,
678- } ;
688+ ) ;
679689 run_benchmarks ( & mut rt, conn, shared, None , Some ( config) ) ?;
680690 Ok ( 0 )
681691 }
@@ -1149,11 +1159,11 @@ fn bench_published_artifact(
11491159 is_self_profile : false ,
11501160 bench_rustc : false ,
11511161 } ) ,
1152- Some ( RuntimeBenchmarkConfig {
1162+ Some ( RuntimeBenchmarkConfig :: new (
11531163 runtime_suite,
1154- filter : BenchmarkFilter :: keep_all ( ) ,
1155- iterations : DEFAULT_RUNTIME_ITERATIONS ,
1156- } ) ,
1164+ BenchmarkFilter :: keep_all ( ) ,
1165+ DEFAULT_RUNTIME_ITERATIONS ,
1166+ ) ) ,
11571167 )
11581168}
11591169
0 commit comments