Skip to content

Commit

Permalink
Fix benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
pitrou committed Jan 16, 2025
1 parent 88aaf24 commit bc68bfb
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 14 deletions.
4 changes: 3 additions & 1 deletion cpp/src/arrow/compute/kernels/scalar_arithmetic_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@

#include <vector>

#include "arrow/array.h"
#include "arrow/chunked_array.h"
#include "arrow/compute/api_scalar.h"
#include "arrow/compute/kernels/test_util.h"
#include "arrow/datum.h"
#include "arrow/testing/gtest_util.h"
#include "arrow/testing/random.h"
#include "arrow/util/benchmark_util.h"
Expand Down
1 change: 0 additions & 1 deletion cpp/src/arrow/compute/kernels/scalar_boolean_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <vector>

#include "arrow/compute/api_scalar.h"
#include "arrow/compute/kernels/test_util.h"
#include "arrow/testing/gtest_util.h"
#include "arrow/testing/random.h"
#include "arrow/util/benchmark_util.h"
Expand Down
1 change: 0 additions & 1 deletion cpp/src/arrow/compute/kernels/scalar_cast_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <vector>

#include "arrow/compute/cast.h"
#include "arrow/compute/kernels/test_util.h"
#include "arrow/testing/gtest_util.h"
#include "arrow/testing/random.h"
#include "arrow/util/benchmark_util.h"
Expand Down
3 changes: 2 additions & 1 deletion cpp/src/arrow/compute/kernels/scalar_compare_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
#include <vector>

#include "arrow/compute/api_scalar.h"
#include "arrow/compute/kernels/test_util.h"
#include "arrow/compute/function.h"
#include "arrow/compute/kernels/test_util_internal.h"
#include "arrow/testing/gtest_util.h"
#include "arrow/testing/random.h"
#include "arrow/util/benchmark_util.h"
Expand Down
3 changes: 2 additions & 1 deletion cpp/src/arrow/compute/kernels/scalar_random_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
#include "benchmark/benchmark.h"

#include "arrow/compute/api_scalar.h"
#include "arrow/compute/kernels/test_util.h"
#include "arrow/compute/exec.h"
#include "arrow/compute/function.h"
#include "arrow/testing/gtest_util.h"
#include "arrow/util/benchmark_util.h"

Expand Down
4 changes: 3 additions & 1 deletion cpp/src/arrow/compute/kernels/scalar_round_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@

#include <vector>

#include "arrow/array.h"
#include "arrow/chunked_array.h"
#include "arrow/compute/api_scalar.h"
#include "arrow/compute/kernels/test_util.h"
#include "arrow/datum.h"
#include "arrow/testing/gtest_util.h"
#include "arrow/testing/random.h"
#include "arrow/util/benchmark_util.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

#include "arrow/compute/api_scalar.h"
#include "arrow/compute/kernels/common_internal.h"
#include "arrow/compute/kernels/test_util.h"
#include "arrow/testing/gtest_util.h"
#include "arrow/testing/random.h"
#include "arrow/util/benchmark_util.h"
Expand Down
8 changes: 6 additions & 2 deletions cpp/src/arrow/compute/kernels/scalar_string_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,14 @@

#include "benchmark/benchmark.h"

#include "arrow/array.h"
#include "arrow/chunked_array.h"
#include "arrow/compute/api_scalar.h"
#include "arrow/compute/kernels/test_util.h"
#include "arrow/compute/function.h"
#include "arrow/datum.h"
#include "arrow/testing/gtest_util.h"
#include "arrow/testing/random.h"
#include "arrow/type_fwd.h"
#include "arrow/util/benchmark_util.h"
#include "arrow/util/checked_cast.h"
#include "arrow/util/config.h"
Expand Down Expand Up @@ -180,7 +184,7 @@ static void BinaryJoinElementWise(benchmark::State& state,

random::RandomArrayGenerator rng(kSeed);

DatumVector args;
std::vector<Datum> args;
ArrayVector strings;
int64_t total_values_length = 0;
for (int i = 0; i < n_cols; i++) {
Expand Down
1 change: 0 additions & 1 deletion cpp/src/arrow/compute/kernels/scalar_temporal_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "benchmark/benchmark.h"

#include "arrow/compute/api_scalar.h"
#include "arrow/compute/kernels/test_util.h"
#include "arrow/testing/gtest_util.h"
#include "arrow/testing/random.h"
#include "arrow/util/benchmark_util.h"
Expand Down
3 changes: 2 additions & 1 deletion cpp/src/arrow/compute/kernels/vector_partition_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@

#include "benchmark/benchmark.h"

#include "arrow/array/array_base.h"
#include "arrow/chunked_array.h"
#include "arrow/compute/api_vector.h"
#include "arrow/compute/kernels/test_util.h"
#include "arrow/testing/gtest_util.h"
#include "arrow/testing/random.h"
#include "arrow/util/benchmark_util.h"
Expand Down
6 changes: 5 additions & 1 deletion cpp/src/arrow/compute/kernels/vector_selection_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@
#include <cstdint>
#include <sstream>

#include "arrow/array.h"
#include "arrow/chunked_array.h"
#include "arrow/compute/api_vector.h"
#include "arrow/compute/kernels/test_util.h"
#include "arrow/datum.h"
#include "arrow/record_batch.h"
#include "arrow/table.h"
#include "arrow/testing/gtest_util.h"
#include "arrow/testing/random.h"
#include "arrow/util/benchmark_util.h"
Expand Down
5 changes: 4 additions & 1 deletion cpp/src/arrow/compute/kernels/vector_sort_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@

#include "benchmark/benchmark.h"

#include "arrow/array.h"
#include "arrow/chunked_array.h"
#include "arrow/compute/api_vector.h"
#include "arrow/compute/kernels/test_util.h"
#include "arrow/compute/function.h"
#include "arrow/datum.h"
#include "arrow/table.h"
#include "arrow/testing/gtest_util.h"
#include "arrow/testing/random.h"
Expand Down
5 changes: 4 additions & 1 deletion cpp/src/arrow/compute/kernels/vector_topk_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@

#include "benchmark/benchmark.h"

#include "arrow/array.h"
#include "arrow/chunked_array.h"
#include "arrow/compute/api_vector.h"
#include "arrow/compute/kernels/test_util.h"
#include "arrow/compute/function.h"
#include "arrow/datum.h"
#include "arrow/testing/gtest_util.h"
#include "arrow/testing/random.h"
#include "arrow/util/benchmark_util.h"
Expand Down

0 comments on commit bc68bfb

Please sign in to comment.