From 2c3e7e80bd861d28e6395f503650828c0eb05580 Mon Sep 17 00:00:00 2001
From: Sree Kuchibhotla <sreek@google.com>
Date: Tue, 4 Apr 2017 16:21:52 -0700
Subject: [PATCH] use wallclock

---
 test/cpp/microbenchmarks/bm_cq_multiple_threads.cc | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc b/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc
index f68baad2b0..82f402d3dd 100644
--- a/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc
+++ b/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc
@@ -127,18 +127,16 @@ static void BM_Cq_Throughput(benchmark::State& state) {
   if (state.thread_index == 0) {
     grpc_completion_queue_shutdown(g_cq);
     grpc_completion_queue_destroy(g_cq);
-
-    state.SetItemsProcessed(state.iterations());
   }
 
   track_counters.Finish(state);
 }
 
-BENCHMARK(BM_Cq_Throughput)->Threads(1);
-BENCHMARK(BM_Cq_Throughput)->Threads(2);
-BENCHMARK(BM_Cq_Throughput)->Threads(4);
-BENCHMARK(BM_Cq_Throughput)->Threads(8);
-BENCHMARK(BM_Cq_Throughput)->Threads(16);
+BENCHMARK(BM_Cq_Throughput)->Threads(1)->UseRealTime();
+BENCHMARK(BM_Cq_Throughput)->Threads(2)->UseRealTime();
+BENCHMARK(BM_Cq_Throughput)->Threads(4)->UseRealTime();
+BENCHMARK(BM_Cq_Throughput)->Threads(8)->UseRealTime();
+BENCHMARK(BM_Cq_Throughput)->Threads(16)->UseRealTime();
 
 }  // namespace testing
 }  // namespace grpc
-- 
GitLab