You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/01/11 16:38:36 UTC

[GitHub] [arrow] kiszk commented on a change in pull request #8210: ARROW-10031: [CI][Java] Support Java benchmark in Archery

kiszk commented on a change in pull request #8210:
URL: https://github.com/apache/arrow/pull/8210#discussion_r555183556



##########
File path: dev/archery/archery/cli.py
##########
@@ -550,19 +649,34 @@ def benchmark_diff(ctx, src, preserve, output, cmake_extras,
     # This should not recompute the benchmark from run.json
     archery --quiet benchmark diff WORKSPACE run.json > result.json
     """
+    if language == "cpp":
+        ctx.forward(benchmark_diff_cpp, **kwargs)
+    elif language == "java":
+        ctx.forward(benchmark_diff_java, **kwargs)
+
+
+@benchmark.command(name="diff_cpp")
+@click.pass_context
+def benchmark_diff_cpp(ctx, src, preserve, output, language, cmake_extras,

Review comment:
       This separation comes from `@click.pass_context`. To use different options between two languages (e.g. `java-home` or `cxx-flags`), my understanding was that we need different methods with the `@click.pass_context`.
   
   Let me try to have one method with @click.pass_context by lazily parse arguments for each language.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org