@@ -88,6 +88,16 @@ struct RuntimeBenchmarkConfig {
88
88
iterations : u32 ,
89
89
}
90
90
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
+
91
101
struct SharedBenchmarkConfig {
92
102
artifact_id : ArtifactId ,
93
103
toolchain : Toolchain ,
@@ -671,11 +681,11 @@ fn main_result() -> anyhow::Result<i32> {
671
681
artifact_id,
672
682
toolchain,
673
683
} ;
674
- let config = RuntimeBenchmarkConfig {
684
+ let config = RuntimeBenchmarkConfig :: new (
675
685
runtime_suite,
676
- filter : BenchmarkFilter :: new ( local. exclude , local. include ) ,
686
+ BenchmarkFilter :: new ( local. exclude , local. include ) ,
677
687
iterations,
678
- } ;
688
+ ) ;
679
689
run_benchmarks ( & mut rt, conn, shared, None , Some ( config) ) ?;
680
690
Ok ( 0 )
681
691
}
@@ -1149,11 +1159,11 @@ fn bench_published_artifact(
1149
1159
is_self_profile : false ,
1150
1160
bench_rustc : false ,
1151
1161
} ) ,
1152
- Some ( RuntimeBenchmarkConfig {
1162
+ Some ( RuntimeBenchmarkConfig :: new (
1153
1163
runtime_suite,
1154
- filter : BenchmarkFilter :: keep_all ( ) ,
1155
- iterations : DEFAULT_RUNTIME_ITERATIONS ,
1156
- } ) ,
1164
+ BenchmarkFilter :: keep_all ( ) ,
1165
+ DEFAULT_RUNTIME_ITERATIONS ,
1166
+ ) ) ,
1157
1167
)
1158
1168
}
1159
1169
0 commit comments