aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/microbenchmarks/bm_fullstack_trickle.cc
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2017-11-09 17:46:29 -0800
committerGravatar Yash Tibrewal <yashkt@google.com>2017-11-09 17:46:29 -0800
commit4e9265c828f0b559b5fdba04913fed46bf771399 (patch)
tree4a379fc2bdc037753cf8d81f8b86327e4bc50a42 /test/cpp/microbenchmarks/bm_fullstack_trickle.cc
parent0ee7574732a06e8cace4e099a678f4bd5dbff679 (diff)
parentd9da7387b8057f3bd99a417a5ee905377bce9296 (diff)
Merge with master
Diffstat (limited to 'test/cpp/microbenchmarks/bm_fullstack_trickle.cc')
-rw-r--r--test/cpp/microbenchmarks/bm_fullstack_trickle.cc37
1 files changed, 21 insertions, 16 deletions
diff --git a/test/cpp/microbenchmarks/bm_fullstack_trickle.cc b/test/cpp/microbenchmarks/bm_fullstack_trickle.cc
index 43735eed0e..2680ae6198 100644
--- a/test/cpp/microbenchmarks/bm_fullstack_trickle.cc
+++ b/test/cpp/microbenchmarks/bm_fullstack_trickle.cc
@@ -21,6 +21,7 @@
#include <benchmark/benchmark.h>
#include <gflags/gflags.h>
#include <fstream>
+
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/ext/transport/chttp2/transport/internal.h"
#include "src/core/lib/iomgr/timer_manager.h"
@@ -134,23 +135,27 @@ class TrickledCHTTP2 : public EndpointPairFixture {
? static_cast<grpc_chttp2_stream*>(server->stream_map.values[0])
: nullptr;
write_csv(
- log_.get(), static_cast<double>(now.tv_sec) +
- 1e-9 * static_cast<double>(now.tv_nsec),
+ log_.get(),
+ static_cast<double>(now.tv_sec) +
+ 1e-9 * static_cast<double>(now.tv_nsec),
iteration, grpc_trickle_get_backlog(endpoint_pair_.client),
grpc_trickle_get_backlog(endpoint_pair_.server),
client->lists[GRPC_CHTTP2_LIST_STALLED_BY_TRANSPORT].head != nullptr,
client->lists[GRPC_CHTTP2_LIST_STALLED_BY_STREAM].head != nullptr,
server->lists[GRPC_CHTTP2_LIST_STALLED_BY_TRANSPORT].head != nullptr,
server->lists[GRPC_CHTTP2_LIST_STALLED_BY_STREAM].head != nullptr,
- client->flow_control.remote_window, server->flow_control.remote_window,
- client->flow_control.announced_window,
- server->flow_control.announced_window,
- client_stream ? client_stream->flow_control.remote_window_delta : -1,
- server_stream ? server_stream->flow_control.remote_window_delta : -1,
- client_stream ? client_stream->flow_control.local_window_delta : -1,
- server_stream ? server_stream->flow_control.local_window_delta : -1,
- client_stream ? client_stream->flow_control.announced_window_delta : -1,
- server_stream ? server_stream->flow_control.announced_window_delta : -1,
+ client->flow_control->remote_window_,
+ server->flow_control->remote_window_,
+ client->flow_control->announced_window_,
+ server->flow_control->announced_window_,
+ client_stream ? client_stream->flow_control->remote_window_delta_ : -1,
+ server_stream ? server_stream->flow_control->remote_window_delta_ : -1,
+ client_stream ? client_stream->flow_control->local_window_delta_ : -1,
+ server_stream ? server_stream->flow_control->local_window_delta_ : -1,
+ client_stream ? client_stream->flow_control->announced_window_delta_
+ : -1,
+ server_stream ? server_stream->flow_control->announced_window_delta_
+ : -1,
client->settings[GRPC_PEER_SETTINGS]
[GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE],
client->settings[GRPC_LOCAL_SETTINGS]
@@ -175,10 +180,10 @@ class TrickledCHTTP2 : public EndpointPairFixture {
ExecCtx _local_exec_ctx;
inc_time();
size_t client_backlog =
- grpc_trickle_endpoint_trickle(endpoint_pair_.client);
+ grpc_trickle_endpoint_trickle(&exec_ctx, endpoint_pair_.client);
size_t server_backlog =
- grpc_trickle_endpoint_trickle(endpoint_pair_.server);
- grpc_exec_ctx_finish();
+ grpc_trickle_endpoint_trickle(&exec_ctx, endpoint_pair_.server);
+ grpc_exec_ctx_finish(&exec_ctx);
if (update_stats) {
UpdateStats((grpc_chttp2_transport*)client_transport_, &client_stats_,
client_backlog);
@@ -437,8 +442,8 @@ static void UnaryTrickleArgs(benchmark::internal::Benchmark* b) {
}
}
BENCHMARK(BM_PumpUnbalancedUnary_Trickle)->Apply(UnaryTrickleArgs);
-}
-}
+} // namespace testing
+} // namespace grpc
extern "C" gpr_timespec (*gpr_now_impl)(gpr_clock_type clock_type);