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

Function BM_ReadStructColumn

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

Source from the content-addressed store, hash-verified

602}
603
604static void BM_ReadStructColumn(::benchmark::State& state) {
605 constexpr int64_t kNumValues = BENCHMARK_SIZE / 10;
606 const double null_probability = static_cast<double>(state.range(0)) / 100.0;
607 const bool nullable = (null_probability != 0.0);
608
609 ARROW_CHECK_GE(null_probability, 0.0);
610
611 const int64_t kBytesPerValue = sizeof(int32_t) + sizeof(int64_t);
612
613 ::arrow::random::RandomArrayGenerator rng(42);
614 auto array = MakeStructArray(&rng, kNumValues, null_probability);
615
616 BenchmarkReadArray(state, array, nullable, kNumValues, kBytesPerValue * kNumValues);
617}
618
619BENCHMARK(BM_ReadStructColumn)->Apply(NestedReadArguments);
620

Callers

nothing calls this directly

Calls 2

MakeStructArrayFunction · 0.85
BenchmarkReadArrayFunction · 0.85

Tested by

no test coverage detected