Skip to content
Snippets Groups Projects
Commit 0163460b authored by Vijay Pai's avatar Vijay Pai
Browse files

Mark creation of call, performing ops on channel

parent fad38ba4
No related branches found
No related tags found
No related merge requests found
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/slice.h> #include <grpc/support/slice.h>
#include "src/core/profiling/timers.h"
#include "src/cpp/proto/proto_utils.h" #include "src/cpp/proto/proto_utils.h"
#include <grpc++/channel_arguments.h> #include <grpc++/channel_arguments.h>
#include <grpc++/client_context.h> #include <grpc++/client_context.h>
...@@ -65,6 +66,7 @@ Call Channel::CreateCall(const RpcMethod& method, ClientContext* context, ...@@ -65,6 +66,7 @@ Call Channel::CreateCall(const RpcMethod& method, ClientContext* context,
? target_.c_str() ? target_.c_str()
: context->authority().c_str(), : context->authority().c_str(),
context->RawDeadline()); context->RawDeadline());
GRPC_TIMER_MARK(CALL_CREATED,c_call);
context->set_call(c_call); context->set_call(c_call);
return Call(c_call, this, cq); return Call(c_call, this, cq);
} }
...@@ -73,9 +75,11 @@ void Channel::PerformOpsOnCall(CallOpBuffer* buf, Call* call) { ...@@ -73,9 +75,11 @@ void Channel::PerformOpsOnCall(CallOpBuffer* buf, Call* call) {
static const size_t MAX_OPS = 8; static const size_t MAX_OPS = 8;
size_t nops = MAX_OPS; size_t nops = MAX_OPS;
grpc_op ops[MAX_OPS]; grpc_op ops[MAX_OPS];
GRPC_TIMER_MARK(PERFORM_OPS_BEGIN, call->call());
buf->FillOps(ops, &nops); buf->FillOps(ops, &nops);
GPR_ASSERT(GRPC_CALL_OK == GPR_ASSERT(GRPC_CALL_OK ==
grpc_call_start_batch(call->call(), ops, nops, buf)); grpc_call_start_batch(call->call(), ops, nops, buf));
GRPC_TIMER_MARK(PERFORM_OPS_END, call->call());
} }
} // namespace grpc } // namespace grpc
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment