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

Function BuildFixedSizeBinaryArray

cpp/src/arrow/builder_benchmark.cc:211–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211static void BuildFixedSizeBinaryArray(
212 benchmark::State& state) { // NOLINT non-const reference
213 auto type = fixed_size_binary(static_cast<int32_t>(kBinaryView.size()));
214
215 for (auto _ : state) {
216 FixedSizeBinaryBuilder builder(type, memory_tracker.memory_pool());
217
218 for (int64_t i = 0; i < kRounds * kNumberOfElements; i++) {
219 ABORT_NOT_OK(builder.Append(kBinaryView));
220 }
221
222 std::shared_ptr<Array> out;
223 ABORT_NOT_OK(builder.Finish(&out));
224 }
225
226 state.SetBytesProcessed(state.iterations() * kBytesProcessed);
227 state.SetItemsProcessed(state.iterations() * kItemsProcessed);
228}
229
230static void BuildDecimalArray(benchmark::State& state) { // NOLINT non-const reference
231 auto type = decimal128(10, 5);

Callers

nothing calls this directly

Calls 5

fixed_size_binaryFunction · 0.85
sizeMethod · 0.45
memory_poolMethod · 0.45
AppendMethod · 0.45
FinishMethod · 0.45

Tested by

no test coverage detected