@@ -18,6 +18,7 @@ pub fn bench_runtime(
1818 id : Option < & str > ,
1919 filter : BenchmarkFilter ,
2020 benchmark_dir : PathBuf ,
21+ iterations : u32 ,
2122) -> anyhow:: Result < ( ) > {
2223 let toolchain = get_local_toolchain ( & [ Profile :: Opt ] , rustc, None , None , id, "" ) ?;
2324 let output = compile_runtime_benchmark_binaries ( & toolchain, & benchmark_dir) ?;
@@ -33,7 +34,7 @@ pub fn bench_runtime(
3334
3435 let mut benchmark_index = 0 ;
3536 for binary in suite. groups {
36- for message in execute_runtime_benchmark_binary ( & binary. binary , & filter) ? {
37+ for message in execute_runtime_benchmark_binary ( & binary. binary , & filter, iterations ) ? {
3738 let message = message. map_err ( |err| {
3839 anyhow:: anyhow!(
3940 "Cannot parse BenchmarkMessage from benchmark {}: {err:?}" ,
@@ -65,13 +66,16 @@ pub fn bench_runtime(
6566fn execute_runtime_benchmark_binary (
6667 binary : & Path ,
6768 filter : & BenchmarkFilter ,
69+ iterations : u32 ,
6870) -> anyhow:: Result < impl Iterator < Item = anyhow:: Result < BenchmarkMessage > > > {
6971 // Turn off ASLR
7072 let mut command = Command :: new ( "setarch" ) ;
7173 command. arg ( std:: env:: consts:: ARCH ) ;
7274 command. arg ( "-R" ) ;
7375 command. arg ( binary) ;
7476 command. arg ( "run" ) ;
77+ command. arg ( "--iterations" ) ;
78+ command. arg ( & iterations. to_string ( ) ) ;
7579
7680 if let Some ( ref exclude) = filter. exclude {
7781 command. args ( & [ "--exclude" , exclude] ) ;
0 commit comments