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

Function BM_ReadListColumn

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

Source from the content-addressed store, hash-verified

662BENCHMARK(BM_ReadStructOfListColumn)->Apply(NestedReadArguments);
663
664static void BM_ReadListColumn(::benchmark::State& state) {
665 constexpr int64_t kNumValues = BENCHMARK_SIZE / 10;
666 const double null_probability = static_cast<double>(state.range(0)) / 100.0;
667 const bool nullable = (null_probability != 0.0);
668
669 ARROW_CHECK_GE(null_probability, 0.0);
670
671 ::arrow::random::RandomArrayGenerator rng(42);
672
673 auto values = rng.Int64(kNumValues, /*min=*/-5, /*max=*/5, null_probability);
674 const int64_t kBytesPerValue = sizeof(int64_t);
675
676 auto array = rng.List(*values, kNumValues / 10, null_probability);
677
678 BenchmarkReadArray(state, array, nullable, kNumValues, kBytesPerValue * kNumValues);
679}
680
681BENCHMARK(BM_ReadListColumn)->Apply(NestedReadArguments);
682

Callers

nothing calls this directly

Calls 3

BenchmarkReadArrayFunction · 0.85
Int64Method · 0.45
ListMethod · 0.45

Tested by

no test coverage detected