aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/core/profiling/timers_test.c10
-rw-r--r--test/cpp/qps/client_sync.cc4
2 files changed, 9 insertions, 5 deletions
diff --git a/test/core/profiling/timers_test.c b/test/core/profiling/timers_test.c
index b79cde64bd..7070fe465f 100644
--- a/test/core/profiling/timers_test.c
+++ b/test/core/profiling/timers_test.c
@@ -54,15 +54,15 @@ void test_log_events(size_t num_seqs) {
for (j = 0; j < advance; j++) {
switch (state[i]) {
case 0:
- GRPC_TIMER_MARK(STATE_0, i);
+ GPR_TIMER_MARK(STATE_0, i);
state[i]++;
break;
case 1:
- GRPC_TIMER_MARK(STATE_1, i);
+ GPR_TIMER_MARK(STATE_1, i);
state[i]++;
break;
case 2:
- GRPC_TIMER_MARK(STATE_2, i);
+ GPR_TIMER_MARK(STATE_2, i);
state[i]++;
break;
case 3:
@@ -76,8 +76,8 @@ void test_log_events(size_t num_seqs) {
int main(int argc, char **argv) {
grpc_test_init(argc, argv);
- grpc_timers_global_init();
+ gpr_timers_global_init();
test_log_events(1000000);
- grpc_timers_global_destroy();
+ gpr_timers_global_destroy();
return 0;
}
diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc
index beef604856..3c33a1c5de 100644
--- a/test/cpp/qps/client_sync.cc
+++ b/test/cpp/qps/client_sync.cc
@@ -59,6 +59,8 @@
#include "test/cpp/qps/interarrival.h"
#include "test/cpp/qps/timer.h"
+#include "src/core/profiling/timers.h"
+
namespace grpc {
namespace testing {
@@ -99,6 +101,7 @@ class SynchronousUnaryClient GRPC_FINAL : public SynchronousClient {
WaitToIssue(thread_idx);
auto* stub = channels_[thread_idx % channels_.size()].get_stub();
double start = Timer::Now();
+ GPR_TIMER_SCOPE("SynchronousUnaryClient::ThreadFunc", 0);
grpc::ClientContext context;
grpc::Status s =
stub->UnaryCall(&context, request_, &responses_[thread_idx]);
@@ -135,6 +138,7 @@ class SynchronousStreamingClient GRPC_FINAL : public SynchronousClient {
bool ThreadFunc(Histogram* histogram, size_t thread_idx) GRPC_OVERRIDE {
WaitToIssue(thread_idx);
+ GPR_TIMER_SCOPE("SynchronousStreamingClient::ThreadFunc", 0);
double start = Timer::Now();
if (stream_[thread_idx]->Write(request_) &&
stream_[thread_idx]->Read(&responses_[thread_idx])) {