From 52721eadc7ea1cb3555bb3c997c508f95cd13af7 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Thu, 15 Oct 2020 16:20:09 -0700 Subject: [PATCH] Order LargeInitialBlock after non-initial-block test. --- tests/benchmark.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/benchmark.cc b/tests/benchmark.cc index 3d9a72a7ec..84034768ad 100644 --- a/tests/benchmark.cc +++ b/tests/benchmark.cc @@ -72,10 +72,10 @@ static void BM_LoadDescriptor_Proto2(benchmark::State& state) { } 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; 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_parse(descriptor.data, descriptor.size, arena); @@ -88,12 +88,12 @@ static void BM_ParseDescriptor_Upb_LargeInitialBlock(benchmark::State& state) { } 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; 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_parse(descriptor.data, descriptor.size, arena); @@ -106,7 +106,7 @@ static void BM_ParseDescriptor_Upb(benchmark::State& state) { } state.SetBytesProcessed(state.iterations() * descriptor.size); } -BENCHMARK(BM_ParseDescriptor_Upb); +BENCHMARK(BM_ParseDescriptor_Upb_LargeInitialBlock); static void BM_ParseDescriptor_Proto2_NoArena(benchmark::State& state) { size_t bytes = 0;