Skip to content

Commit

Permalink
apacheGH-39706: [Archery] Fix benchmark diff subcommand
Browse files Browse the repository at this point in the history
  • Loading branch information
pitrou committed Jan 22, 2024
1 parent c33ffb0 commit 15cd171
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 15cd171

Please sign in to comment.