| 526 | // |
| 527 | |
| 528 | static 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 | |
| 545 | static void SetReadBinaryColumnArgs(benchmark::internal::Benchmark* b) { |
| 546 | b->ArgNames({"null_probability", "unique_values"}) |
no test coverage detected