Used the correct copy of the protos in the benchmark.

pull/13171/head
Joshua Haberman 4 years ago
parent d01b712dbb
commit 44a7130845
  1. 12
      tests/benchmark.cc

@ -76,9 +76,9 @@ static void BM_ParseDescriptor_Upb(benchmark::State& state) {
size_t bytes = 0;
for (auto _ : state) {
upb_arena* arena = upb_arena_new();
google_protobuf_FileDescriptorProto* set =
google_protobuf_FileDescriptorProto_parse(descriptor.data,
descriptor.size, arena);
upb_benchmark_FileDescriptorProto* set =
upb_benchmark_FileDescriptorProto_parse(descriptor.data,
descriptor.size, arena);
if (!set) {
printf("Failed to parse.\n");
exit(1);
@ -94,9 +94,9 @@ static void BM_ParseDescriptor_Upb_LargeInitialBlock(benchmark::State& state) {
size_t bytes = 0;
for (auto _ : state) {
upb_arena* arena = upb_arena_init(buf, sizeof(buf), NULL);
google_protobuf_FileDescriptorProto* set =
google_protobuf_FileDescriptorProto_parse(descriptor.data,
descriptor.size, arena);
upb_benchmark_FileDescriptorProto* set =
upb_benchmark_FileDescriptorProto_parse(descriptor.data,
descriptor.size, arena);
if (!set) {
printf("Failed to parse.\n");
exit(1);

Loading…
Cancel
Save