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

Function BuildChunkedBinaryArray

cpp/src/arrow/builder_benchmark.cc:191–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189}
190
191static void BuildChunkedBinaryArray(
192 benchmark::State& state) { // NOLINT non-const reference
193 // 1MB chunks
194 const int32_t kChunkSize = 1 << 20;
195
196 for (auto _ : state) {
197 internal::ChunkedBinaryBuilder builder(kChunkSize, memory_tracker.memory_pool());
198
199 for (int64_t i = 0; i < kRounds * kNumberOfElements; i++) {
200 ABORT_NOT_OK(builder.Append(kBinaryView));
201 }
202
203 ArrayVector out;
204 ABORT_NOT_OK(builder.Finish(&out));
205 }
206
207 state.SetBytesProcessed(state.iterations() * kBytesProcessed);
208 state.SetItemsProcessed(state.iterations() * kItemsProcessed);
209}
210
211static void BuildFixedSizeBinaryArray(
212 benchmark::State& state) { // NOLINT non-const reference

Callers

nothing calls this directly

Calls 3

memory_poolMethod · 0.45
AppendMethod · 0.45
FinishMethod · 0.45

Tested by

no test coverage detected