aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/microbenchmarks/bm_chttp2_transport.cc
diff options
context:
space:
mode:
authorGravatar ncteisen <ncteisen@gmail.com>2017-07-13 19:45:51 -0700
committerGravatar ncteisen <ncteisen@gmail.com>2017-07-18 17:06:58 -0700
commit3c909d55fd56a8fd3d4b25d88722ded67dae3c51 (patch)
treec1aae416843bbd2c421da8c740be5048a1620696 /test/cpp/microbenchmarks/bm_chttp2_transport.cc
parent2d1c61699ecb10bca0fc735f38766ba370bf6ea0 (diff)
Pull out flow control objects
Diffstat (limited to 'test/cpp/microbenchmarks/bm_chttp2_transport.cc')
-rw-r--r--test/cpp/microbenchmarks/bm_chttp2_transport.cc37
1 files changed, 19 insertions, 18 deletions
diff --git a/test/cpp/microbenchmarks/bm_chttp2_transport.cc b/test/cpp/microbenchmarks/bm_chttp2_transport.cc
index 9193330f78..cb113c5254 100644
--- a/test/cpp/microbenchmarks/bm_chttp2_transport.cc
+++ b/test/cpp/microbenchmarks/bm_chttp2_transport.cc
@@ -391,8 +391,9 @@ static void BM_TransportStreamSend(benchmark::State &state) {
MakeClosure([&](grpc_exec_ctx *exec_ctx, grpc_error *error) {
if (!state.KeepRunning()) return;
// force outgoing window to be yuge
- s.chttp2_stream()->remote_window_delta = 1024 * 1024 * 1024;
- f.chttp2_transport()->remote_window = 1024 * 1024 * 1024;
+ s.chttp2_stream()->flow_control.remote_window_delta =
+ 1024 * 1024 * 1024;
+ f.chttp2_transport()->flow_control.remote_window = 1024 * 1024 * 1024;
grpc_slice_buffer_stream_init(&send_stream, &send_buffer, 0);
reset_op();
op.on_complete = c.get();
@@ -517,22 +518,22 @@ static void BM_TransportStreamRecv(benchmark::State &state) {
std::unique_ptr<Closure> drain_continue;
grpc_slice recv_slice;
- std::unique_ptr<Closure> c =
- MakeClosure([&](grpc_exec_ctx *exec_ctx, grpc_error *error) {
- if (!state.KeepRunning()) return;
- // force outgoing window to be yuge
- s.chttp2_stream()->local_window_delta = 1024 * 1024 * 1024;
- s.chttp2_stream()->announced_window_delta = 1024 * 1024 * 1024;
- f.chttp2_transport()->announced_window = 1024 * 1024 * 1024;
- received = 0;
- reset_op();
- op.on_complete = do_nothing.get();
- op.recv_message = true;
- op.payload->recv_message.recv_message = &recv_stream;
- op.payload->recv_message.recv_message_ready = drain_start.get();
- s.Op(&op);
- f.PushInput(grpc_slice_ref(incoming_data));
- });
+ std::unique_ptr<Closure> c = MakeClosure([&](grpc_exec_ctx *exec_ctx,
+ grpc_error *error) {
+ if (!state.KeepRunning()) return;
+ // force outgoing window to be yuge
+ s.chttp2_stream()->flow_control.local_window_delta = 1024 * 1024 * 1024;
+ s.chttp2_stream()->flow_control.announced_window_delta = 1024 * 1024 * 1024;
+ f.chttp2_transport()->flow_control.announced_window = 1024 * 1024 * 1024;
+ received = 0;
+ reset_op();
+ op.on_complete = do_nothing.get();
+ op.recv_message = true;
+ op.payload->recv_message.recv_message = &recv_stream;
+ op.payload->recv_message.recv_message_ready = drain_start.get();
+ s.Op(&op);
+ f.PushInput(grpc_slice_ref(incoming_data));
+ });
drain_start = MakeClosure([&](grpc_exec_ctx *exec_ctx, grpc_error *error) {
if (recv_stream == NULL) {