| 58 | } |
| 59 | |
| 60 | static 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 | |
| 73 | BENCHMARK(BM_PlainEncodingBoolean)->Range(MIN_RANGE, MAX_RANGE); |
| 74 |
nothing calls this directly
no test coverage detected