Skip to content

Commit

Permalink
apacheGH-39706: [Archery] Fix benchmark diff subcommand (apache#39733)
Browse files Browse the repository at this point in the history
### What changes are included in this PR?

This fixes a regression introduced in apacheGH-39303.

### Are these changes tested?

Only manually.

### Are there any user-facing changes?

No.

* Closes: apache#39706

Authored-by: Antoine Pitrou <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
  • Loading branch information
pitrou authored and thisisnic committed Mar 8, 2024
1 parent d2933bc commit eabc339
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions dev/archery/archery/benchmark/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ 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)
return StaticBenchmarkRunner.from_json(rev_or_path, **kwargs)
elif CMakeBuild.is_build_dir(rev_or_path):
build = CMakeBuild.from_path(rev_or_path)
Expand Down
14 changes: 9 additions & 5 deletions dev/archery/archery/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ def benchmark_filter_options(cmd):
@click.pass_context
def benchmark_list(ctx, rev_or_path, src, preserve, output, cmake_extras,
java_home, java_options, build_extras, benchmark_extras,
language, **kwargs):
cpp_benchmark_extras, language, **kwargs):
""" List benchmark suite.
"""
with tmpdir(preserve=preserve) as root:
Expand All @@ -418,7 +418,8 @@ def benchmark_list(ctx, rev_or_path, src, preserve, output, cmake_extras,
cmake_extras=cmake_extras, **kwargs)

runner_base = CppBenchmarkRunner.from_rev_or_path(
src, root, rev_or_path, conf)
src, root, rev_or_path, conf,
benchmark_extras=cpp_benchmark_extras)

elif language == "java":
for key in {'cpp_package_prefix', 'cxx_flags', 'cxx', 'cc'}:
Expand Down Expand Up @@ -546,7 +547,8 @@ def benchmark_run(ctx, rev_or_path, src, preserve, output, cmake_extras,
def benchmark_diff(ctx, src, preserve, output, language, cmake_extras,
suite_filter, benchmark_filter, repetitions, no_counters,
java_home, java_options, build_extras, benchmark_extras,
threshold, contender, baseline, **kwargs):
cpp_benchmark_extras, threshold, contender, baseline,
**kwargs):
"""Compare (diff) benchmark runs.
This command acts like git-diff but for benchmark results.
Expand Down Expand Up @@ -633,12 +635,14 @@ def benchmark_diff(ctx, src, preserve, output, language, cmake_extras,
src, root, contender, conf,
repetitions=repetitions,
suite_filter=suite_filter,
benchmark_filter=benchmark_filter)
benchmark_filter=benchmark_filter,
benchmark_extras=cpp_benchmark_extras)
runner_base = CppBenchmarkRunner.from_rev_or_path(
src, root, baseline, conf,
repetitions=repetitions,
suite_filter=suite_filter,
benchmark_filter=benchmark_filter)
benchmark_filter=benchmark_filter,
benchmark_extras=cpp_benchmark_extras)

elif language == "java":
for key in {'cpp_package_prefix', 'cxx_flags', 'cxx', 'cc'}:
Expand Down

0 comments on commit eabc339

Please sign in to comment.