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

Function CountKernelBenchInt64

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

Source from the content-addressed store, hash-verified

727//
728
729static void CountKernelBenchInt64(benchmark::State& state) {
730 RegressionArgs args(state);
731 const int64_t array_size = args.size / sizeof(int64_t);
732 auto rand = random::RandomArrayGenerator(1923);
733 auto array = rand.Numeric<Int64Type>(array_size, -100, 100, args.null_proportion);
734
735 for (auto _ : state) {
736 ABORT_NOT_OK(Count(array->Slice(1, array_size)).status());
737 }
738
739 state.SetItemsProcessed(state.iterations() * array_size);
740}
741BENCHMARK(CountKernelBenchInt64)->Args({1 * 1024 * 1024, 2}); // 1M with 50% null.
742
743//

Callers

nothing calls this directly

Calls 3

CountFunction · 0.85
statusMethod · 0.45
SliceMethod · 0.45

Tested by

no test coverage detected