Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cpp/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
"cacheVariables": {
"ARROW_BUILD_BENCHMARKS": "ON",
"ARROW_BUILD_BENCHMARKS_REFERENCE": "ON",
"ARROW_BUILD_OPENMP_BENCHMARKS": "ON",
"ARROW_BUILD_DETAILED_BENCHMARKS": "OFF",
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
},
Expand Down
4 changes: 4 additions & 0 deletions cpp/cmake_modules/BuildUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,10 @@ function(ADD_BENCHMARK REL_BENCHMARK_NAME)
set(ARG_LABELS benchmark)
endif()

if(ARROW_BUILD_DETAILED_BENCHMARKS)
target_compile_definitions(${BENCHMARK_NAME} PRIVATE ARROW_BUILD_DETAILED_BENCHMARKS)
endif()

add_test(${BENCHMARK_NAME}
${BUILD_SUPPORT_DIR}/run-test.sh
${CMAKE_BINARY_DIR}
Expand Down
6 changes: 6 additions & 0 deletions cpp/cmake_modules/DefineOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
define_option(ARROW_BUILD_BENCHMARKS_REFERENCE
"Build the Arrow micro reference benchmarks" OFF)

define_option(ARROW_BUILD_OPENMP_BENCHMARKS
"Build the Arrow benchmarks that rely on OpenMP" OFF)

define_option(ARROW_BUILD_DETAILED_BENCHMARKS
"Build benchmarks that do a longer exploration of performance" OFF)

if(ARROW_BUILD_SHARED)
set(ARROW_TEST_LINKAGE_DEFAULT "shared")
else()
Expand Down
13 changes: 13 additions & 0 deletions cpp/src/arrow/compute/exec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@ add_arrow_compute_test(util_test PREFIX "arrow-compute")

add_arrow_benchmark(expression_benchmark PREFIX "arrow-compute")

if(ARROW_BUILD_OPENMP_BENCHMARKS)
find_package(OpenMP REQUIRED)
add_arrow_benchmark(hash_join_benchmark
PREFIX
"arrow-compute"
EXTRA_LINK_LIBS
OpenMP::OpenMP_CXX)
if(MSVC)
target_compile_options(arrow-compute-hash-join-benchmark
PRIVATE "-openmp:experimental -openmp:llvm")
endif()
endif()

add_arrow_compute_test(ir_test
PREFIX
"arrow-compute"
Expand Down
Loading