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

Function BM_ReadListColumn

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

Source from the content-addressed store, hash-verified

704BENCHMARK(BM_ReadStructOfListColumn)->Apply(NestedReadArguments);
705
706static void BM_ReadListColumn(::benchmark::State& state) {
707 constexpr int64_t kNumValues = BENCHMARK_SIZE / 10;
708 const double null_probability = static_cast<double>(state.range(0)) / 100.0;
709 const bool nullable = (null_probability != 0.0);
710
711 ARROW_CHECK_GE(null_probability, 0.0);
712
713 ::arrow::random::RandomArrayGenerator rng(42);
714
715 auto values = rng.Int64(kNumValues, /*min=*/-5, /*max=*/5, null_probability);
716 const int64_t kBytesPerValue = sizeof(int64_t);
717
718 auto array = rng.List(*values, kNumValues / 10, null_probability);
719
720 BenchmarkReadArray(state, array, nullable, kNumValues, kBytesPerValue * kNumValues);
721}
722
723BENCHMARK(BM_ReadListColumn)->Apply(NestedReadArguments);
724

Callers

nothing calls this directly

Calls 3

BenchmarkReadArrayFunction · 0.85
Int64Method · 0.45
ListMethod · 0.45

Tested by

no test coverage detected