Apache DataFusion SQL Query Engine
ARROW-7436: [Archery] Enable more benchmark binaries in archery benchmark
François Saint-Jacques1b443fc9044b
diff --git a/dev/archery/archery/benchmark/runner.py b/dev/archery/archery/benchmark/runner.pyindex 46aa966f5f..d33de42e32 100644--- a/dev/archery/archery/benchmark/runner.py+++ b/dev/archery/archery/benchmark/runner.py@@ -22,7 +22,7 @@ import refrom .core import BenchmarkSuitefrom .google import GoogleBenchmarkCommand, GoogleBenchmark-from ..lang.cpp import CppCMakeDefinition+from ..lang.cpp import CppCMakeDefinition, CppConfigurationfrom ..utils.cmake import CMakeBuildfrom ..utils.logger import logger@@ -133,6 +133,13 @@ class CppBenchmarkRunner(BenchmarkRunner):self.build = buildsuper().__init__(**kwargs)+ @staticmethod+ def default_configuration(**kwargs):+ """ Returns the default benchmark configuration. """+ return CppConfiguration(+ build_type="release", with_tests=True, with_benchmarks=True,+ with_compute=True, with_python=False, **kwargs)+@propertydef suites_binaries(self):""" Returns a list of benchmark binaries for this build. """diff --git a/dev/archery/archery/cli.py b/dev/archery/archery/cli.pyindex 47387b22dc..234d3baf42 100644--- a/dev/archery/archery/cli.py+++ b/dev/archery/archery/cli.py@@ -24,7 +24,7 @@ import osimport sysfrom .benchmark.compare import RunnerComparator, DEFAULT_THRESHOLD-from .benchmark.runner import BenchmarkRunner+from .benchmark.runner import BenchmarkRunner, CppBenchmarkRunnerfrom .lang.cpp import CppCMakeDefinition, CppConfigurationfrom .utils.codec import JsonEncoderfrom .utils.lint import linter, LintValidationException@@ -290,10 +290,8 @@ def benchmark_list(ctx, rev_or_path, src, preserve, output, cmake_extras,with tmpdir(preserve=preserve) as root:logger.debug(f"Running benchmark {rev_or_path}")- conf = CppConfiguration(- build_type="release", with_tests=True, with_benchmarks=True,- with_python=False, cmake_extras=cmake_extras,- **kwargs)+ conf = CppBenchmarkRunner.default_configuration(+ cmake_extras=cmake_extras, **kwargs)runner_base = BenchmarkRunner.from_rev_or_path(src, root, rev_or_path, conf)@@ -345,9 +343,8 @@ def benchmark_run(ctx, rev_or_path, src, preserve, output, cmake_extras,with tmpdir(preserve=preserve) as root:logger.debug(f"Running benchmark {rev_or_path}")- conf = CppConfiguration(- build_type="release", with_tests=True, with_benchmarks=True,- with_python=False, cmake_extras=cmake_extras, **kwargs)+ conf = CppBenchmarkRunner.default_configuration(+ cmake_extras=cmake_extras, **kwargs)runner_base = BenchmarkRunner.from_rev_or_path(src, root, rev_or_path, conf,@@ -444,9 +441,8 @@ def benchmark_diff(ctx, src, preserve, output, cmake_extras,logger.debug(f"Comparing {contender} (contender) with "f"{baseline} (baseline)")- conf = CppConfiguration(- build_type="release", with_tests=True, with_benchmarks=True,- with_python=False, cmake_extras=cmake_extras, **kwargs)+ conf = CppBenchmarkRunner.default_configuration(+ cmake_extras=cmake_extras, **kwargs)runner_cont = BenchmarkRunner.from_rev_or_path(src, root, contender, conf,diff --git a/dev/archery/archery/lang/cpp.py b/dev/archery/archery/lang/cpp.pyindex 2cf3f44b23..15983fcae3 100644--- a/dev/archery/archery/lang/cpp.py+++ b/dev/archery/archery/lang/cpp.py@@ -38,7 +38,7 @@ class CppConfiguration:# componentswith_tests=True, with_benchmarks=False, with_python=True,with_parquet=False, with_gandiva=False, with_plasma=False,- with_flight=False,+ with_flight=False, with_compute=False, with_dataset=False,# extraswith_lint_only=False,cmake_extras=None):@@ -59,6 +59,8 @@ class CppConfiguration:self.with_gandiva = with_gandivaself.with_plasma = with_plasmaself.with_flight = with_flight+ self.with_compute = with_compute+ self.with_dataset = with_datasetself.with_lint_only = with_lint_only@@ -94,6 +96,8 @@ class CppConfiguration:yield ("ARROW_GANDIVA", truthifier(self.with_gandiva))yield ("ARROW_PLASMA", truthifier(self.with_plasma))yield ("ARROW_FLIGHT", truthifier(self.with_flight))+ yield ("ARROW_COMPUTE", truthifier(self.with_compute))+ yield ("ARROW_DATASET", truthifier(self.with_dataset))yield ("ARROW_LINT_ONLY", truthifier(self.with_lint_only))