diff options
author | Craig Tiller <ctiller@google.com> | 2017-04-04 08:46:47 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-04-04 08:46:47 -0700 |
commit | eb0e34f73616a6fd8af79d2a02f477baf82d88e1 (patch) | |
tree | 43bb435e483f51eb888457612f4b05e25f47e48c /test/cpp/microbenchmarks/bm_chttp2_hpack.cc | |
parent | 83f7b9559c52d3c7f857a8ac80f5c21dcb9d2490 (diff) |
Convert everything to new encode API
Diffstat (limited to 'test/cpp/microbenchmarks/bm_chttp2_hpack.cc')
-rw-r--r-- | test/cpp/microbenchmarks/bm_chttp2_hpack.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc index 55d2d2f58d..7426407874 100644 --- a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc +++ b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc @@ -90,9 +90,14 @@ static void BM_HpackEncoderEncodeHeader(benchmark::State &state) { grpc_slice_buffer outbuf; grpc_slice_buffer_init(&outbuf); while (state.KeepRunning()) { - uint32_t stream_id = static_cast<uint32_t>(state.iterations()); - grpc_chttp2_encode_header(&exec_ctx, &c, stream_id, &b, state.range(0), - state.range(1), &stats, &outbuf); + grpc_encode_header_options hopt = { + static_cast<uint32_t>(state.iterations()), + state.range(0) != 0, + false, + (size_t)state.range(1), + &stats, + }; + grpc_chttp2_encode_header(&exec_ctx, &c, &b, &hopt, &outbuf); if (!logged_representative_output) { logged_representative_output = true; for (size_t i = 0; i < outbuf.count; i++) { |