diff options
author | Donna Dionne <donnadionne@google.com> | 2015-04-22 12:40:59 -0700 |
---|---|---|
committer | Donna Dionne <donnadionne@google.com> | 2015-04-22 12:40:59 -0700 |
commit | d0a162dc78ec7dcef280418b68850826905938f7 (patch) | |
tree | eed3836daa203db3ef14cd0b8245d84849657d9c /src/cpp/server/server.cc | |
parent | f9f8aca5b043197aa4471fec7000f4443824b818 (diff) | |
parent | 2c48566e71373c60c7191b3e5c75a9af52a79358 (diff) |
Merge branch 'master' of github.com:google/grpc into private_build
Diffstat (limited to 'src/cpp/server/server.cc')
-rw-r--r-- | src/cpp/server/server.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc index 046133c5eb..b3cd1fdd74 100644 --- a/src/cpp/server/server.cc +++ b/src/cpp/server/server.cc @@ -46,6 +46,7 @@ #include <grpc++/server_credentials.h> #include <grpc++/thread_pool_interface.h> +#include "src/core/profiling/timers.h" #include "src/cpp/proto/proto_utils.h" #include "src/cpp/util/time.h" @@ -123,10 +124,12 @@ class Server::SyncRequest GRPC_FINAL : public CompletionQueueTag { std::unique_ptr<grpc::protobuf::Message> req; std::unique_ptr<grpc::protobuf::Message> res; if (has_request_payload_) { + GRPC_TIMER_MARK(DESER_PROTO_BEGIN, call_.call()); req.reset(method_->AllocateRequestProto()); if (!DeserializeProto(request_payload_, req.get())) { abort(); // for now } + GRPC_TIMER_MARK(DESER_PROTO_END, call_.call()); } if (has_response_payload_) { res.reset(method_->AllocateResponseProto()); @@ -340,7 +343,9 @@ class Server::AsyncRequest GRPC_FINAL : public CompletionQueueTag { bool orig_status = *status; if (*status && request_) { if (payload_) { + GRPC_TIMER_MARK(DESER_PROTO_BEGIN, call_); *status = DeserializeProto(payload_, request_); + GRPC_TIMER_MARK(DESER_PROTO_END, call_); } else { *status = false; } |