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

Function BM_ReadListOfListColumn

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

BenchmarkReadArrayFunction · 0.85
Int64Method · 0.45
ListMethod · 0.45

Tested by

no test coverage detected