| 198 | |
| 199 | template <bool nullable, typename ParquetType> |
| 200 | static void BM_WriteColumn(::benchmark::State& state) { |
| 201 | using T = typename ParquetType::c_type; |
| 202 | std::vector<T> values(BENCHMARK_SIZE, static_cast<T>(128)); |
| 203 | std::shared_ptr<Table> table = TableFromVector<ParquetType>(values, nullable); |
| 204 | |
| 205 | while (state.KeepRunning()) { |
| 206 | auto output = CreateOutputStream(); |
| 207 | EXIT_NOT_OK( |
| 208 | WriteTable(*table, ::arrow::default_memory_pool(), output, BENCHMARK_SIZE)); |
| 209 | } |
| 210 | SetBytesProcessed<ParquetType>(state); |
| 211 | } |
| 212 | |
| 213 | BENCHMARK_TEMPLATE2(BM_WriteColumn, false, Int32Type); |
| 214 | BENCHMARK_TEMPLATE2(BM_WriteColumn, true, Int32Type); |
nothing calls this directly
no test coverage detected