MCPcopy Create free account
hub / github.com/apache/arrow / MinMaxKernelBench

Function MinMaxKernelBench

cpp/src/arrow/acero/aggregate_benchmark.cc:695–708  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

693
694template <typename ArrowType>
695static void MinMaxKernelBench(benchmark::State& state) {
696 using CType = typename TypeTraits<ArrowType>::CType;
697
698 RegressionArgs args(state);
699 const int64_t array_size = args.size / sizeof(CType);
700 auto rand = random::RandomArrayGenerator(1923);
701 auto array = rand.Numeric<ArrowType>(array_size, -100, 100, args.null_proportion);
702
703 for (auto _ : state) {
704 ABORT_NOT_OK(MinMax(array).status());
705 }
706
707 state.SetItemsProcessed(state.iterations() * array_size);
708}
709
710static void MinMaxKernelBenchArgs(benchmark::internal::Benchmark* bench) {
711 BenchmarkSetArgsWithSizes(bench, {1 * 1024 * 1024}); // 1M

Callers

nothing calls this directly

Calls 2

MinMaxFunction · 0.50
statusMethod · 0.45

Tested by

no test coverage detected