Skip to content

Commit fbbada9

Browse files
committed
apacheGH-39306: [C++][Benchmarking] Reduce hardcoded min times
1 parent b862b16 commit fbbada9

File tree

3 files changed

+19
-21
lines changed

3 files changed

+19
-21
lines changed

cpp/src/arrow/compute/kernels/vector_partition_benchmark.cc

-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ BENCHMARK(NthToIndicesInt64)
5252
->Apply(RegressionSetArgs)
5353
->Args({1 << 20, 100})
5454
->Args({1 << 23, 100})
55-
->MinTime(1.0)
5655
->Unit(benchmark::TimeUnit::kNanosecond);
5756

5857
} // namespace compute

cpp/src/arrow/compute/kernels/vector_topk_benchmark.cc

-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ BENCHMARK(SelectKInt64)
5252
->Apply(RegressionSetArgs)
5353
->Args({1 << 20, 100})
5454
->Args({1 << 23, 100})
55-
->MinTime(1.0)
5655
->Unit(benchmark::TimeUnit::kNanosecond);
5756

5857
} // namespace compute

cpp/src/gandiva/tests/micro_benchmarks.cc

+19-19
Original file line numberDiff line numberDiff line change
@@ -460,24 +460,24 @@ static void DecimalAdd3Large(benchmark::State& state) {
460460
DoDecimalAdd3(state, DecimalTypeUtil::kMaxPrecision, 18, true);
461461
}
462462

463-
BENCHMARK(TimedTestAdd3)->MinTime(1.0)->Unit(benchmark::kMicrosecond);
464-
BENCHMARK(TimedTestBigNested)->MinTime(1.0)->Unit(benchmark::kMicrosecond);
465-
BENCHMARK(TimedTestExtractYear)->MinTime(1.0)->Unit(benchmark::kMicrosecond);
466-
BENCHMARK(TimedTestFilterAdd2)->MinTime(1.0)->Unit(benchmark::kMicrosecond);
467-
BENCHMARK(TimedTestFilterLike)->MinTime(1.0)->Unit(benchmark::kMicrosecond);
468-
BENCHMARK(TimedTestCastFloatFromString)->MinTime(1.0)->Unit(benchmark::kMicrosecond);
469-
BENCHMARK(TimedTestCastIntFromString)->MinTime(1.0)->Unit(benchmark::kMicrosecond);
470-
BENCHMARK(TimedTestAllocs)->MinTime(1.0)->Unit(benchmark::kMicrosecond);
471-
BENCHMARK(TimedTestOutputStringAllocs)->MinTime(1.0)->Unit(benchmark::kMicrosecond);
472-
BENCHMARK(TimedTestMultiOr)->MinTime(1.0)->Unit(benchmark::kMicrosecond);
473-
BENCHMARK(TimedTestInExpr)->MinTime(1.0)->Unit(benchmark::kMicrosecond);
474-
BENCHMARK(DecimalAdd2Fast)->MinTime(1.0)->Unit(benchmark::kMicrosecond);
475-
BENCHMARK(DecimalAdd2LeadingZeroes)->MinTime(1.0)->Unit(benchmark::kMicrosecond);
476-
BENCHMARK(DecimalAdd2LeadingZeroesWithDiv)->MinTime(1.0)->Unit(benchmark::kMicrosecond);
477-
BENCHMARK(DecimalAdd2Large)->MinTime(1.0)->Unit(benchmark::kMicrosecond);
478-
BENCHMARK(DecimalAdd3Fast)->MinTime(1.0)->Unit(benchmark::kMicrosecond);
479-
BENCHMARK(DecimalAdd3LeadingZeroes)->MinTime(1.0)->Unit(benchmark::kMicrosecond);
480-
BENCHMARK(DecimalAdd3LeadingZeroesWithDiv)->MinTime(1.0)->Unit(benchmark::kMicrosecond);
481-
BENCHMARK(DecimalAdd3Large)->MinTime(1.0)->Unit(benchmark::kMicrosecond);
463+
BENCHMARK(TimedTestAdd3)->Unit(benchmark::kMicrosecond);
464+
BENCHMARK(TimedTestBigNested)->Unit(benchmark::kMicrosecond);
465+
BENCHMARK(TimedTestExtractYear)->Unit(benchmark::kMicrosecond);
466+
BENCHMARK(TimedTestFilterAdd2)->Unit(benchmark::kMicrosecond);
467+
BENCHMARK(TimedTestFilterLike)->Unit(benchmark::kMicrosecond);
468+
BENCHMARK(TimedTestCastFloatFromString)->Unit(benchmark::kMicrosecond);
469+
BENCHMARK(TimedTestCastIntFromString)->Unit(benchmark::kMicrosecond);
470+
BENCHMARK(TimedTestAllocs)->Unit(benchmark::kMicrosecond);
471+
BENCHMARK(TimedTestOutputStringAllocs)->Unit(benchmark::kMicrosecond);
472+
BENCHMARK(TimedTestMultiOr)->Unit(benchmark::kMicrosecond);
473+
BENCHMARK(TimedTestInExpr)->Unit(benchmark::kMicrosecond);
474+
BENCHMARK(DecimalAdd2Fast)->Unit(benchmark::kMicrosecond);
475+
BENCHMARK(DecimalAdd2LeadingZeroes)->Unit(benchmark::kMicrosecond);
476+
BENCHMARK(DecimalAdd2LeadingZeroesWithDiv)->Unit(benchmark::kMicrosecond);
477+
BENCHMARK(DecimalAdd2Large)->Unit(benchmark::kMicrosecond);
478+
BENCHMARK(DecimalAdd3Fast)->Unit(benchmark::kMicrosecond);
479+
BENCHMARK(DecimalAdd3LeadingZeroes)->Unit(benchmark::kMicrosecond);
480+
BENCHMARK(DecimalAdd3LeadingZeroesWithDiv)->Unit(benchmark::kMicrosecond);
481+
BENCHMARK(DecimalAdd3Large)->Unit(benchmark::kMicrosecond);
482482

483483
} // namespace gandiva

0 commit comments

Comments
 (0)