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

Function BM_ReadColumn

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

Source from the content-addressed store, hash-verified

344
345template <bool nullable, typename ParquetType>
346static void BM_ReadColumn(::benchmark::State& state) {
347 using T = typename ParquetType::c_type;
348
349 auto values = RandomVector<T>(/*percentage=*/state.range(1), BENCHMARK_SIZE,
350 Examples<T>::values());
351
352 std::shared_ptr<Table> table =
353 TableFromVector<ParquetType>(values, nullable, state.range(0));
354
355 auto properties = WriterProperties::Builder().disable_dictionary()->build();
356
357 BenchmarkReadTable(state, *table, properties, table->num_rows(),
358 BytesForItems<ParquetType>(table->num_rows()));
359}
360
361// There are two parameters here that cover different data distributions.
362// null_percentage governs distribution and therefore runs of null values.

Callers

nothing calls this directly

Calls 5

BenchmarkReadTableFunction · 0.85
valuesFunction · 0.50
BuilderFunction · 0.50
buildMethod · 0.45
num_rowsMethod · 0.45

Tested by

no test coverage detected