aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--test/cpp/microbenchmarks/bm_chttp2_hpack.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc
index f160e77634..741825cada 100644
--- a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc
+++ b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc
@@ -457,7 +457,7 @@ static void BM_HpackParserParseHeader(benchmark::State& state) {
std::vector<grpc_slice> benchmark_slices = Fixture::GetBenchmarkSlices();
grpc_chttp2_hpack_parser p;
grpc_chttp2_hpack_parser_init(&p);
- const int kArenaSize = 4096;
+ const int kArenaSize = 4096 * 4096;
gpr_arena* arena = gpr_arena_create(kArenaSize);
p.on_header = OnHeader;
p.on_header_user_data = arena;
@@ -469,8 +469,8 @@ static void BM_HpackParserParseHeader(benchmark::State& state) {
GPR_ASSERT(GRPC_ERROR_NONE == grpc_chttp2_hpack_parser_parse(&p, slice));
}
grpc_core::ExecCtx::Get()->Flush();
- // recreate arena every 64k iterations to avoid oom
- if (0 == (state.iterations() & 0xffff)) {
+ // Recreate arena every 4k iterations to avoid oom
+ if (0 == (state.iterations() & 0xfff)) {
gpr_arena_destroy(arena);
arena = gpr_arena_create(kArenaSize);
}