diff options
author | 2015-10-13 15:26:33 -0700 | |
---|---|---|
committer | 2015-10-13 15:26:33 -0700 | |
commit | 5f9e979e8c73c38791e109be9bc02c41fc45f453 (patch) | |
tree | 0649bd2f3a999ac18678dfcaf3d77124be35a9c4 /src/cpp | |
parent | af6f3ac555402f74ef36526844218d5fae8560a5 (diff) | |
parent | bee8f104c0827bc829402d79c8302835adfc37f9 (diff) |
Merge branch 'master' of github.com:grpc/grpc into cq_alarm
Diffstat (limited to 'src/cpp')
-rw-r--r-- | src/cpp/client/channel.cc | 3 | ||||
-rw-r--r-- | src/cpp/proto/proto_utils.cc | 4 | ||||
-rw-r--r-- | src/cpp/server/server.cc | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/src/cpp/client/channel.cc b/src/cpp/client/channel.cc index dc8e304664..c7974d655b 100644 --- a/src/cpp/client/channel.cc +++ b/src/cpp/client/channel.cc @@ -78,7 +78,6 @@ Call Channel::CreateCall(const RpcMethod& method, ClientContext* context, context->raw_deadline(), nullptr); } grpc_census_call_set_context(c_call, context->census_context()); - GRPC_TIMER_MARK(GRPC_PTAG_CPP_CALL_CREATED, c_call); context->set_call(c_call, shared_from_this()); return Call(c_call, this, cq); } @@ -87,11 +86,9 @@ void Channel::PerformOpsOnCall(CallOpSetInterface* ops, Call* call) { static const size_t MAX_OPS = 8; size_t nops = 0; grpc_op cops[MAX_OPS]; - GRPC_TIMER_BEGIN(GRPC_PTAG_CPP_PERFORM_OPS, call->call()); ops->FillOps(cops, &nops); GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(call->call(), cops, nops, ops, nullptr)); - GRPC_TIMER_END(GRPC_PTAG_CPP_PERFORM_OPS, call->call()); } void* Channel::RegisterMethod(const char* method) { diff --git a/src/cpp/proto/proto_utils.cc b/src/cpp/proto/proto_utils.cc index 4131fbe5e5..b1330fde7f 100644 --- a/src/cpp/proto/proto_utils.cc +++ b/src/cpp/proto/proto_utils.cc @@ -42,6 +42,8 @@ #include <grpc/support/port_platform.h> #include <grpc++/support/config.h> +#include "src/core/profiling/timers.h" + const int kMaxBufferLength = 8192; class GrpcBufferWriter GRPC_FINAL @@ -158,6 +160,7 @@ namespace grpc { Status SerializeProto(const grpc::protobuf::Message& msg, grpc_byte_buffer** bp) { + GPR_TIMER_SCOPE("SerializeProto", 0); int byte_size = msg.ByteSize(); if (byte_size <= kMaxBufferLength) { gpr_slice slice = gpr_slice_malloc(byte_size); @@ -176,6 +179,7 @@ Status SerializeProto(const grpc::protobuf::Message& msg, Status DeserializeProto(grpc_byte_buffer* buffer, grpc::protobuf::Message* msg, int max_message_size) { + GPR_TIMER_SCOPE("DeserializeProto", 0); if (!buffer) { return Status(StatusCode::INTERNAL, "No payload"); } diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc index e09744b842..f5063a079e 100644 --- a/src/cpp/server/server.cc +++ b/src/cpp/server/server.cc @@ -540,6 +540,7 @@ void Server::ScheduleCallback() { void Server::RunRpc() { // Wait for one more incoming rpc. bool ok; + GPR_TIMER_SCOPE("Server::RunRpc", 0); auto* mrd = SyncRequest::Wait(&cq_, &ok); if (mrd) { ScheduleCallback(); @@ -555,6 +556,7 @@ void Server::RunRpc() { mrd->TeardownRequest(); } } + GPR_TIMER_SCOPE("cd.Run()", 0); cd.Run(); } } |