facebook/tornado — pull request #488 by spoof (2012-04-06 09:35:36+00:00)
Title: Added 'full_request_time' method to HTTPRequest class that returns full amount of time it took to execute

Sometimes it's very useful to measure full time taken to execute request (from accepting to sending to client). It helps analyze performance of server and add more instances to handle clients' request more faster. In the current implementation of tornado the 'request_time' method returns time from begin executing to sending to client. So before request can be executed it can take to much time for waiting HTTP headers (because of network problems or too overloaded ioloop) and calling '_on_headers' method.

I left 'log_request' method as is. But if you need to add full request time for logging you need to override that method and replace 'log_method' call to:

full_request_time = 1000.0 * handler.request.full_request_time()
log_method("%s %.2fms (overall: %.2fms)", handler._request_summary(), request_time, full_request_time)