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

Function DecodeProtobufCpp

valdi_protobuf/src/benchmark/Benchmark.cpp:46–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46static void DecodeProtobufCpp(benchmark::State& state) {
47 auto protoData = makeProtoData();
48
49 for (auto _ : state) {
50 auto message = makeShared<test::Message>();
51 if (!message->ParseFromArray(protoData.data(), protoData.size())) {
52 SC_ABORT("Message failed to parse");
53 }
54 }
55}
56BENCHMARK(DecodeProtobufCpp);
57
58static void DecodeProtobufReflectionCpp(benchmark::State& state) {

Callers

nothing calls this directly

Calls 3

makeProtoDataFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected