MCPcopy Create free account
hub / github.com/Snapchat/Valdi / DecodeValdiProtobuf

Function DecodeValdiProtobuf

valdi_protobuf/src/benchmark/Benchmark.cpp:110–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108BENCHMARK(EncodeProtobufReflectionCpp);
109
110static void DecodeValdiProtobuf(benchmark::State& state) {
111 auto protoData = makeProtoData();
112 const auto* descriptor = test::Message::GetDescriptor();
113
114 for (auto _ : state) {
115 auto message = Protobuf::Message::parse(protoData, descriptor);
116 if (!message) {
117 SC_ABORT("Message failed to parse");
118 }
119 }
120}
121BENCHMARK(DecodeValdiProtobuf);
122
123static void DecodeValdiProtobufNoPostprocess(benchmark::State& state) {

Callers

nothing calls this directly

Calls 3

makeProtoDataFunction · 0.85
GetDescriptorFunction · 0.85
parseFunction · 0.50

Tested by

no test coverage detected