Skip to content

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.py
index 46aa966f5f..d33de42e32 100644
--- a/dev/archery/archery/benchmark/runner.py
+++ b/dev/archery/archery/benchmark/runner.py
@@ -22,7 +22,7 @@ import re
from .core import BenchmarkSuite
from .google import GoogleBenchmarkCommand, GoogleBenchmark
-from ..lang.cpp import CppCMakeDefinition
+from ..lang.cpp import CppCMakeDefinition, CppConfiguration
from ..utils.cmake import CMakeBuild
from ..utils.logger import logger
@@ -133,6 +133,13 @@ class CppBenchmarkRunner(BenchmarkRunner):
self.build = build
super().__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)
+
@property
def 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.py
index 47387b22dc..234d3baf42 100644
--- a/dev/archery/archery/cli.py
+++ b/dev/archery/archery/cli.py
@@ -24,7 +24,7 @@ import os
import sys
from .benchmark.compare import RunnerComparator, DEFAULT_THRESHOLD
-from .benchmark.runner import BenchmarkRunner
+from .benchmark.runner import BenchmarkRunner, CppBenchmarkRunner
from .lang.cpp import CppCMakeDefinition, CppConfiguration
from .utils.codec import JsonEncoder
from .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.py
index 2cf3f44b23..15983fcae3 100644
--- a/dev/archery/archery/lang/cpp.py
+++ b/dev/archery/archery/lang/cpp.py
@@ -38,7 +38,7 @@ class CppConfiguration:
# components
with_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,
# extras
with_lint_only=False,
cmake_extras=None):
@@ -59,6 +59,8 @@ class CppConfiguration:
self.with_gandiva = with_gandiva
self.with_plasma = with_plasma
self.with_flight = with_flight
+ self.with_compute = with_compute
+ self.with_dataset = with_dataset
self.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))