Order LargeInitialBlock after non-initial-block test.

pull/13171/head
Joshua Haberman 5 years ago
parent d225dfc2ed
commit 52721eadc7
  1. 12
      tests/benchmark.cc

@ -72,10 +72,10 @@ static void BM_LoadDescriptor_Proto2(benchmark::State& state) {
} }
BENCHMARK(BM_LoadDescriptor_Proto2); BENCHMARK(BM_LoadDescriptor_Proto2);
static void BM_ParseDescriptor_Upb_LargeInitialBlock(benchmark::State& state) { static void BM_ParseDescriptor_Upb(benchmark::State& state) {
size_t bytes = 0; size_t bytes = 0;
for (auto _ : state) { for (auto _ : state) {
upb_arena* arena = upb_arena_init(buf, sizeof(buf), NULL); upb_arena* arena = upb_arena_new();
upb_benchmark_FileDescriptorProto* set = upb_benchmark_FileDescriptorProto* set =
upb_benchmark_FileDescriptorProto_parse(descriptor.data, upb_benchmark_FileDescriptorProto_parse(descriptor.data,
descriptor.size, arena); descriptor.size, arena);
@ -88,12 +88,12 @@ static void BM_ParseDescriptor_Upb_LargeInitialBlock(benchmark::State& state) {
} }
state.SetBytesProcessed(state.iterations() * descriptor.size); state.SetBytesProcessed(state.iterations() * descriptor.size);
} }
BENCHMARK(BM_ParseDescriptor_Upb_LargeInitialBlock); BENCHMARK(BM_ParseDescriptor_Upb);
static void BM_ParseDescriptor_Upb(benchmark::State& state) { static void BM_ParseDescriptor_Upb_LargeInitialBlock(benchmark::State& state) {
size_t bytes = 0; size_t bytes = 0;
for (auto _ : state) { for (auto _ : state) {
upb_arena* arena = upb_arena_new(); upb_arena* arena = upb_arena_init(buf, sizeof(buf), NULL);
upb_benchmark_FileDescriptorProto* set = upb_benchmark_FileDescriptorProto* set =
upb_benchmark_FileDescriptorProto_parse(descriptor.data, upb_benchmark_FileDescriptorProto_parse(descriptor.data,
descriptor.size, arena); descriptor.size, arena);
@ -106,7 +106,7 @@ static void BM_ParseDescriptor_Upb(benchmark::State& state) {
} }
state.SetBytesProcessed(state.iterations() * descriptor.size); state.SetBytesProcessed(state.iterations() * descriptor.size);
} }
BENCHMARK(BM_ParseDescriptor_Upb); BENCHMARK(BM_ParseDescriptor_Upb_LargeInitialBlock);
static void BM_ParseDescriptor_Proto2_NoArena(benchmark::State& state) { static void BM_ParseDescriptor_Proto2_NoArena(benchmark::State& state) {
size_t bytes = 0; size_t bytes = 0;

Loading…
Cancel
Save