26
26
27
27
BENCHMARK_SYSTEMS : list [str ] = ['mutable' , 'PostgreSQL' , 'DuckDB' , 'HyPer' ] # List of systems
28
28
29
- N_RUNS : int = 5
30
-
31
29
32
30
class BenchmarkError (Exception ):
33
31
pass
@@ -263,7 +261,8 @@ def perform_experiment(
263
261
system : str ,
264
262
info : SimpleNamespace ,
265
263
results : Result ,
266
- output_csv_file : str | None
264
+ output_csv_file : str | None ,
265
+ num_runs : int
267
266
) -> None :
268
267
# Experiment parameters
269
268
systems : dict [str , Any ] = yml .get ('systems' , dict ())
@@ -279,7 +278,7 @@ def perform_experiment(
279
278
280
279
# Perform benchmark
281
280
try :
282
- connector_result : ConnectorResult = conn .execute (N_RUNS , params )
281
+ connector_result : ConnectorResult = conn .execute (num_runs , params )
283
282
except connector .ConnectorException as ex :
284
283
tqdm_print (f"\n An error occurred for { system } while executing { info .path_to_file } : { str (ex )} \n " )
285
284
raise BenchmarkError ()
@@ -479,7 +478,7 @@ def run_benchmarks(args: argparse.Namespace) -> None:
479
478
if system == 'mutable' :
480
479
num_experiments_total += 1
481
480
try :
482
- perform_experiment (yml , conn , system , info , results , output_csv_file )
481
+ perform_experiment (yml , conn , system , info , results , output_csv_file , args . num_runs )
483
482
except BenchmarkError :
484
483
pass # nothing to be done
485
484
else :
@@ -513,6 +512,8 @@ def run_benchmarks(args: argparse.Namespace) -> None:
513
512
help = 'Specify file to write measurement in CSV format' )
514
513
parser .add_argument ('--args' , dest = 'binargs' , metavar = 'ARGS' , default = None , action = 'store' ,
515
514
help = 'provide additional arguments to pass through to the binary' )
515
+ parser .add_argument ('-n' , '--num-runs' , dest = 'num_runs' , metavar = 'RUNS' , default = 5 , action = 'store' , type = int ,
516
+ help = 'specify the number of runs per system, configuration, and case' )
516
517
parser .add_argument ('-v' , '--verbose' , help = 'verbose output' , dest = 'verbose' , default = False , action = 'store_true' )
517
518
parser .add_argument ('--pgsql' , dest = 'pgsql' , default = False , action = 'store_true' ,
518
519
help = 'create a .pgsql file with instructions to insert measurement results into a PostgreSQL '
0 commit comments