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

Function BenchmarkReadBinaryColumn

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

Source from the content-addressed store, hash-verified

526//
527
528static void BenchmarkReadBinaryColumn(::benchmark::State& state,
529 const std::shared_ptr<::arrow::DataType>& type,
530 Encoding::type encoding) {
531 std::shared_ptr<Table> table =
532 RandomStringTable(type, BENCHMARK_SIZE, state.range(1), state.range(0));
533
534 // Offsets / views + data
535 int64_t total_bytes = 0;
536 const ::arrow::ArrayData& column = *table->column(0)->chunk(0)->data();
537 for (size_t i = 1; i < column.buffers.size(); ++i) {
538 total_bytes += column.buffers[i]->size();
539 }
540
541 auto properties = WriterProperties::Builder().encoding(encoding)->build();
542 BenchmarkReadTable(state, *table, properties, table->num_rows(), total_bytes);
543}
544
545static void SetReadBinaryColumnArgs(benchmark::internal::Benchmark* b) {
546 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