Skip to content

Commit 43d3503

Browse files
committed
Re-enable output-dir option
1 parent 8b78c64 commit 43d3503

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

devops/scripts/benchmarks/main.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff 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

devops/scripts/benchmarks/options.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)