Tuesday, 15 September 2020

grpc python measure response time

How can I measure the full time grpc-python takes to handle a request? So far the best I can do is:

def Run(self, request, context):
   start = time.time()
   # service code...
   end = time.time()
   return myservice_stub.Response()

But this doesn't measure how much time grpc takes to serialize the request, response, to transfer it over the network.. and so on. I'm looking for a way to "hook" into these steps.



from grpc python measure response time

No comments:

Post a Comment