Refactor CompareFilter benchmarks

This commit is contained in:
François Saint-Jacques committed 2019-05-27 15:40:42 -04:00
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