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

Function BM_PlainEncodingBoolean

cpp/src/parquet/encoding_benchmark.cc:60–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60static void BM_PlainEncodingBoolean(benchmark::State& state) {
61 std::vector<bool> values(state.range(0), true);
62 auto encoder = MakeEncoder(Type::BOOLEAN, Encoding::PLAIN);
63 auto typed_encoder = dynamic_cast<BooleanEncoder*>(encoder.get());
64
65 for (auto _ : state) {
66 typed_encoder->Put(values, static_cast<int>(values.size()));
67 typed_encoder->FlushValues();
68 }
69 state.SetBytesProcessed(state.iterations() * state.range(0) * sizeof(bool));
70 state.SetItemsProcessed(state.iterations() * state.range(0));
71}
72
73BENCHMARK(BM_PlainEncodingBoolean)->Range(MIN_RANGE, MAX_RANGE);
74

Callers

nothing calls this directly

Calls 5

MakeEncoderFunction · 0.70
getMethod · 0.45
PutMethod · 0.45
sizeMethod · 0.45
FlushValuesMethod · 0.45

Tested by

no test coverage detected