pitrou commented on code in PR #50056:
URL: https://github.com/apache/arrow/pull/50056#discussion_r3460072513


##########
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:
   Too much IMHO indeed :)



##########
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:
   Can you just add a comment explaining that?



##########
dev/archery/archery/benchmark/runner.py:
##########
@@ -211,48 +247,59 @@ def from_rev_or_path(src, root, rev_or_path, cmake_conf, 
**kwargs):
         """
         build = None
         if StaticBenchmarkRunner.is_json_result(rev_or_path):
-            kwargs.pop('benchmark_extras', None)
+            kwargs.pop("benchmark_extras", None)

Review Comment:
   There are a bunch of gratuitous and unrelated formatting changes like this, 
can you revert them?



-- 
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]

Reply via email to