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

Function BM_WriteColumn

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

Source from the content-addressed store, hash-verified

198
199template <bool nullable, typename ParquetType>
200static 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
213BENCHMARK_TEMPLATE2(BM_WriteColumn, false, Int32Type);
214BENCHMARK_TEMPLATE2(BM_WriteColumn, true, Int32Type);

Callers

nothing calls this directly

Calls 3

CreateOutputStreamFunction · 0.85
default_memory_poolFunction · 0.85
WriteTableFunction · 0.70

Tested by

no test coverage detected