| 133 | BENCHMARK(DecodeValdiProtobufNoPostprocess); |
| 134 | |
| 135 | static void EncodeValdiProtobuf(benchmark::State& state) { |
| 136 | auto protoData = makeProtoData(); |
| 137 | const auto* descriptor = test::Message::GetDescriptor(); |
| 138 | auto result = Protobuf::Message::parse(protoData, descriptor); |
| 139 | if (!result) { |
| 140 | SC_ABORT("Message failed to parse"); |
| 141 | } |
| 142 | auto message = result.moveValue(); |
| 143 | |
| 144 | for (auto _ : state) { |
| 145 | benchmark::DoNotOptimize(message->encode()); |
| 146 | } |
| 147 | } |
| 148 | BENCHMARK(EncodeValdiProtobuf); |
| 149 | |
| 150 | BENCHMARK_MAIN(); |
nothing calls this directly
no test coverage detected