AntoinePrv commented on code in PR #50056:
URL: https://github.com/apache/arrow/pull/50056#discussion_r3459729530
##########
dev/archery/archery/cli.py:
##########
@@ -305,6 +328,11 @@ def check_language(ctx, param, value):
click.option("--preserve", type=BOOL, default=False, show_default=True,
is_flag=True,
help="Preserve workspace for investigation."),
+ click.option("--preserve-dir", metavar="<path>",
+ type=click.Path(file_okay=False, resolve_path=True),
+ default=None,
+ help="Parent directory in which to create the preserved "
+ "workspace. Has no effect without --preserve."),
Review Comment:
I thought I'd stay explicit. That way one can alias with some
`--preserve-dir` and then toogle `--preserve` on demand. Too much?
##########
dev/archery/archery/cli.py:
##########
@@ -465,6 +494,15 @@ def benchmark_run(ctx, rev_or_path, src, preserve, output,
cmake_extras,
# when asked to JSON-serialize the results, so produce a JSON
# output even when none is requested.
json_out = json.dumps(runner_base, cls=JsonEncoder)
+ if runner_base.results_dir is not None:
+ results_path = os.path.join(runner_base.results_dir,
+ "benchmark.json")
+ with open(results_path, "w") as f:
+ f.write(json_out)
+ metadata_path = os.path.join(runner_base.results_dir,
+ "metadata.json")
Review Comment:
Yes pure convenience. The idea is to make it hard to confuse runs, for
instance remembering what was the SIMD level I set on this benchmark.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]