mirror of
https://github.com/apache/arrow.git
synced 2026-10-29 17:15:39 +08:00
Refactor CompareFilter benchmarks
This commit is contained in:
1 parent
b7911df3dc
commit
f207974c0b
1 file changed
+3
-3
@@ -29,7 +29,7 @@
|
||||
namespace arrow {
|
||||
namespace compute {
|
||||
|
||||
static void BenchCompareKernel(benchmark::State& state) {
|
||||
static void RegressionCompareArrayScalarKernel(benchmark::State& state) {
|
||||
const int64_t memory_size = state.range(0) / 4;
|
||||
const int64_t array_size = memory_size / sizeof(int64_t);
|
||||
const double null_percent = static_cast<double>(state.range(1)) / 100.0;
|
||||
@@ -37,7 +37,7 @@ static void BenchCompareKernel(benchmark::State& state) {
|
||||
auto array = std::static_pointer_cast<NumericArray<Int64Type>>(
|
||||
rand.Int64(array_size, -100, 100, null_percent));
|
||||
|
||||
CompareOptions ge(GREATER_EQUAL);
|
||||
CompareOptions ge{GREATER_EQUAL};
|
||||
|
||||
FunctionContext ctx;
|
||||
for (auto _ : state) {
|
||||
@@ -51,7 +51,7 @@ static void BenchCompareKernel(benchmark::State& state) {
|
||||
state.SetBytesProcessed(state.iterations() * array_size * sizeof(int64_t));
|
||||
}
|
||||
|
||||
BENCHMARK(BenchCompareKernel)->Apply(BenchmarkSetArgs);
|
||||
BENCHMARK(RegressionCompareArrayScalarKernel)->Apply(RegressionSetArgs);
|
||||
|
||||
} // namespace compute
|
||||
} // namespace arrow
|
||||
Reference in new issue
Block a user