| 244 | } |
| 245 | |
| 246 | static void BM_WriteBinaryColumn(::benchmark::State& state) { |
| 247 | std::shared_ptr<Table> table = |
| 248 | RandomStringTable(::arrow::utf8(), BENCHMARK_SIZE, state.range(1), state.range(0)); |
| 249 | |
| 250 | while (state.KeepRunning()) { |
| 251 | auto output = CreateOutputStream(); |
| 252 | EXIT_NOT_OK( |
| 253 | WriteTable(*table, ::arrow::default_memory_pool(), output, BENCHMARK_SIZE)); |
| 254 | } |
| 255 | |
| 256 | // Offsets + data |
| 257 | int64_t total_bytes = table->column(0)->chunk(0)->data()->buffers[1]->size() + |
| 258 | table->column(0)->chunk(0)->data()->buffers[2]->size(); |
| 259 | state.SetItemsProcessed(BENCHMARK_SIZE * state.iterations()); |
| 260 | state.SetBytesProcessed(total_bytes * state.iterations()); |
| 261 | } |
| 262 | |
| 263 | BENCHMARK(BM_WriteBinaryColumn) |
| 264 | ->ArgNames({"null_probability", "unique_values"}) |
nothing calls this directly
no test coverage detected