Add client-side marks for proto processing.
Need to go in and fill in tag later
diff --git a/src/cpp/common/call.cc b/src/cpp/common/call.cc
index e75e77e..9878133 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 @@
}
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 @@
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_);
}