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

Function BenchmarkReadBinaryColumn

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

Source from the content-addressed store, hash-verified

484//
485
486static void BenchmarkReadBinaryColumn(::benchmark::State& state,
487 const std::shared_ptr<::arrow::DataType>& type,
488 Encoding::type encoding) {
489 std::shared_ptr<Table> table =
490 RandomStringTable(type, BENCHMARK_SIZE, state.range(1), state.range(0));
491
492 // Offsets / views + data
493 int64_t total_bytes = 0;
494 const ::arrow::ArrayData& column = *table->column(0)->chunk(0)->data();
495 for (size_t i = 1; i < column.buffers.size(); ++i) {
496 total_bytes += column.buffers[i]->size();
497 }
498
499 auto properties = WriterProperties::Builder().encoding(encoding)->build();
500 BenchmarkReadTable(state, *table, properties, table->num_rows(), total_bytes);
501}
502
503static void SetReadBinaryColumnArgs(benchmark::internal::Benchmark* b) {
504 b->ArgNames({"null_probability", "unique_values"})

Calls 9

RandomStringTableFunction · 0.85
BenchmarkReadTableFunction · 0.85
BuilderFunction · 0.50
dataMethod · 0.45
columnMethod · 0.45
sizeMethod · 0.45
buildMethod · 0.45
encodingMethod · 0.45
num_rowsMethod · 0.45

Tested by

no test coverage detected