aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/qps/client.h
diff options
context:
space:
mode:
authorGravatar Yuxuan Li <yuxuanli@google.com>2017-05-03 23:29:17 -0700
committerGravatar Yuxuan Li <yuxuanli@google.com>2017-05-03 23:29:17 -0700
commitf8365cd87b5e76dbc050c0c2647e2875a07bca68 (patch)
tree753ea2aa7bab0246be5712e43e1e4d00632abe43 /test/cpp/qps/client.h
parent28efff3e1e3d969f343bd1075039ce25d7834682 (diff)
clean up, fix minor issue
Diffstat (limited to 'test/cpp/qps/client.h')
-rw-r--r--test/cpp/qps/client.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h
index 173f5ab0c4..8006cacedd 100644
--- a/test/cpp/qps/client.h
+++ b/test/cpp/qps/client.h
@@ -163,7 +163,8 @@ class Client {
MaybeStartRequests();
- int last_reset_poll_count_to_use = last_reset_poll_count_;
+ int cur_poll_count = GetPollCount();
+ int poll_count = cur_poll_count - last_reset_poll_count_;
if (reset) {
std::vector<Histogram> to_merge(threads_.size());
std::vector<StatusHistogram> to_merge_status(threads_.size());
@@ -178,7 +179,7 @@ class Client {
MergeStatusHistogram(to_merge_status[i], &statuses);
}
timer_result = timer->Mark();
- last_reset_poll_count_ = GetPollCount();
+ last_reset_poll_count_ = cur_poll_count;
} else {
// merge snapshots of each thread histogram
for (size_t i = 0; i < threads_.size(); i++) {
@@ -198,10 +199,7 @@ class Client {
stats.set_time_elapsed(timer_result.wall);
stats.set_time_system(timer_result.system);
stats.set_time_user(timer_result.user);
- gpr_log(GPR_INFO, "*****poll count : %d %d %d", GetPollCount(),
- last_reset_poll_count_, last_reset_poll_count_to_use);
-
- stats.set_cq_poll_count(GetPollCount() - last_reset_poll_count_to_use);
+ stats.set_cq_poll_count(poll_count);
return stats;
}