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

Function BM_ReadColumn

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

Source from the content-addressed store, hash-verified

386
387template <bool nullable, typename ParquetType>
388static void BM_ReadColumn(::benchmark::State& state) {
389 using T = typename ParquetType::c_type;
390
391 auto values = RandomVector<T>(/*percentage=*/state.range(1), BENCHMARK_SIZE,
392 Examples<T>::values());
393
394 std::shared_ptr<Table> table =
395 TableFromVector<ParquetType>(values, nullable, state.range(0));
396
397 auto properties = WriterProperties::Builder().disable_dictionary()->build();
398
399 BenchmarkReadTable(state, *table, properties, table->num_rows(),
400 BytesForItems<ParquetType>(table->num_rows()));
401}
402
403// There are two parameters here that cover different data distributions.
404// 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