| 484 | // |
| 485 | |
| 486 | static 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 | |
| 503 | static void SetReadBinaryColumnArgs(benchmark::internal::Benchmark* b) { |
| 504 | b->ArgNames({"null_probability", "unique_values"}) |
no test coverage detected