diff options
author | Vijay Pai <vpai@google.com> | 2015-04-15 01:06:58 -0700 |
---|---|---|
committer | Vijay Pai <vpai@google.com> | 2015-04-15 01:06:58 -0700 |
commit | fad38ba4302aa3fa0d3b098e1fad8e09fc494b27 (patch) | |
tree | 261ca3b55867323e5af8aa4e1f93a3830f39635d | |
parent | 9ffbd0ca4dde4c93b81e3178186653ba2cf475d9 (diff) |
Add client-side marks for proto processing.
Need to go in and fill in tag later
-rw-r--r-- | src/cpp/common/call.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cpp/common/call.cc b/src/cpp/common/call.cc index e75e77e0b5..9878133331 100644 --- a/src/cpp/common/call.cc +++ b/src/cpp/common/call.cc @@ -38,6 +38,7 @@ #include <grpc++/client_context.h> #include <grpc++/channel_interface.h> +#include "src/core/profiling/timers.h" #include "src/cpp/proto/proto_utils.h" namespace grpc { @@ -231,11 +232,13 @@ void CallOpBuffer::FillOps(grpc_op* ops, size_t* nops) { } if (send_message_ || send_message_buffer_) { if (send_message_) { + GRPC_TIMER_MARK(SER_PROTO_BEGIN, 0); bool success = SerializeProto(*send_message_, &send_buf_); if (!success) { abort(); // TODO handle parse failure } + GRPC_TIMER_MARK(SER_PROTO_END, 0); } else { send_buf_ = send_message_buffer_->buffer(); } @@ -307,8 +310,10 @@ bool CallOpBuffer::FinalizeResult(void** tag, bool* status) { if (recv_buf_) { got_message = *status; if (recv_message_) { + GRPC_TIMER_MARK(DESER_PROTO_BEGIN, 0); *status = *status && DeserializeProto(recv_buf_, recv_message_); grpc_byte_buffer_destroy(recv_buf_); + GRPC_TIMER_MARK(DESER_PROTO_END, 0); } else { recv_message_buffer_->set_buffer(recv_buf_); } |