File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
devops/scripts/benchmarks Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -413,6 +413,12 @@ def validate_and_parse_env_args(env_args):
413413 parser .add_argument (
414414 "--output-html" , help = "Create HTML output" , action = "store_true" , default = False
415415 )
416+ parser .add_argument (
417+ "--output-dir" ,
418+ type = str ,
419+ help = "Location for output files, if --output-html or --output_markdown was specified." ,
420+ default = None ,
421+ )
416422 parser .add_argument (
417423 "--dry-run" ,
418424 help = "Do not run any actual benchmarks" ,
@@ -500,6 +506,11 @@ def validate_and_parse_env_args(env_args):
500506 if args .compute_runtime is not None :
501507 options .build_compute_runtime = True
502508 options .compute_runtime_tag = args .compute_runtime
509+ if args .output_dir is not None :
510+ if not os .path .isdir (args .output_dir ):
511+ parser .error ("Specified --output-dir is not a valid path" )
512+ options .output_directory = os .path .abspath (args .output_dir )
513+
503514
504515 benchmark_filter = re .compile (args .filter ) if args .filter else None
505516
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ class Options:
3131 compare_max : int = 10 # average/median over how many results
3232 output_markdown : MarkdownSize = MarkdownSize .SHORT
3333 output_html : bool = False
34+ output_directory : str = None
3435 dry_run : bool = False
3536 stddev_threshold : float = 0.02
3637 iterations_stddev : int = 5
You can’t perform that action at this time.
0 commit comments