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

Function BM_ReadStructColumn

cpp/src/parquet/arrow/reader_writer_benchmark.cc:646–659  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

644}
645
646static void BM_ReadStructColumn(::benchmark::State& state) {
647 constexpr int64_t kNumValues = BENCHMARK_SIZE / 10;
648 const double null_probability = static_cast<double>(state.range(0)) / 100.0;
649 const bool nullable = (null_probability != 0.0);
650
651 ARROW_CHECK_GE(null_probability, 0.0);
652
653 const int64_t kBytesPerValue = sizeof(int32_t) + sizeof(int64_t);
654
655 ::arrow::random::RandomArrayGenerator rng(42);
656 auto array = MakeStructArray(&rng, kNumValues, null_probability);
657
658 BenchmarkReadArray(state, array, nullable, kNumValues, kBytesPerValue * kNumValues);
659}
660
661BENCHMARK(BM_ReadStructColumn)->Apply(NestedReadArguments);
662

Callers

nothing calls this directly

Calls 2

MakeStructArrayFunction · 0.85
BenchmarkReadArrayFunction · 0.85

Tested by

no test coverage detected