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

Function BM_RleEncodingBoolean

cpp/src/parquet/encoding_benchmark.cc:1015–1025  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1013BENCHMARK(BM_DeltaDecodingByteArray)->Apply(ByteArrayDeltaCustomArguments);
1014
1015static void BM_RleEncodingBoolean(benchmark::State& state) {
1016 std::vector<bool> values(state.range(0), true);
1017 auto encoder = MakeEncoder(Type::BOOLEAN, Encoding::RLE);
1018 auto typed_encoder = dynamic_cast<BooleanEncoder*>(encoder.get());
1019
1020 for (auto _ : state) {
1021 typed_encoder->Put(values, static_cast<int>(values.size()));
1022 typed_encoder->FlushValues();
1023 }
1024 state.SetBytesProcessed(state.iterations() * state.range(0) * sizeof(bool));
1025}
1026
1027BENCHMARK(BM_RleEncodingBoolean)->Range(MIN_RANGE, MAX_RANGE);
1028

Callers

nothing calls this directly

Calls 5

MakeEncoderFunction · 0.85
getMethod · 0.45
PutMethod · 0.45
sizeMethod · 0.45
FlushValuesMethod · 0.45

Tested by

no test coverage detected