aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/qps/client_async.cc
diff options
context:
space:
mode:
authorGravatar Yuxuan Li <yuxuanli@google.com>2017-05-03 21:36:36 -0700
committerGravatar Yuxuan Li <yuxuanli@google.com>2017-05-03 21:36:36 -0700
commit999ac157e648d6bccdec16a696842bdbf5416e27 (patch)
tree22664fa7ec5693abcf5b86dda05e3f51e64368e1 /test/cpp/qps/client_async.cc
parent12056f1a0cdd3c02ca0b7aeba34a1f72da40f6c9 (diff)
initial implementation.
Diffstat (limited to 'test/cpp/qps/client_async.cc')
-rw-r--r--test/cpp/qps/client_async.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc
index 29a79e7343..2e4b7acba7 100644
--- a/test/cpp/qps/client_async.cc
+++ b/test/cpp/qps/client_async.cc
@@ -54,6 +54,10 @@
#include "test/cpp/qps/usage_timer.h"
#include "test/cpp/util/create_test_channel.h"
+extern "C" {
+#include "src/core/lib/surface/completion_queue.h"
+}
+
namespace grpc {
namespace testing {
@@ -205,6 +209,17 @@ class AsyncClient : public ClientImpl<StubType, RequestType> {
}
}
+int GetPollCount() {
+ int count = 0;
+ int i = 0;
+ for (auto cq = cli_cqs_.begin(); cq != cli_cqs_.end(); cq++) {
+ int k = (int)grpc_get_cq_poll_num((*cq)->cq());
+ gpr_log(GPR_INFO, "%d: per cq poll:%d", i++, k);
+ count += k;
+ }
+ return count;
+}
+
protected:
const int num_async_threads_;