I am using the grequests python library to send GET requests asynchronously to our server.
I cant figure out how to get the server response time for each individual request within the pool of requests being sent out?
unsentrequests=(grequests.get(u) for u in self.urls) # make a pool of requests
responses=grequests.map(unsentrequests) # send the requests asynchronously
To get the start time of a request-response pair I could do the following:
grequests.get(u,headers={'start':time.time())
print responses[0].request.headers['start_time']
But how can I grap the time that the response was received at?