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

Function BM_WriteBinaryColumn

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

Source from the content-addressed store, hash-verified

244}
245
246static 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
263BENCHMARK(BM_WriteBinaryColumn)
264 ->ArgNames({"null_probability", "unique_values"})

Callers

nothing calls this directly

Calls 7

RandomStringTableFunction · 0.85
CreateOutputStreamFunction · 0.85
default_memory_poolFunction · 0.85
WriteTableFunction · 0.70
sizeMethod · 0.45
dataMethod · 0.45
columnMethod · 0.45

Tested by

no test coverage detected