Add a timestamp to web2.server.Request for performance tracking
|Reported by:||Cyrus Daboo||Owned by:|
It is useful to record in an access log the total time taken to process a request. I propose adding an attribute to the init method of Request that records the time when the request object is created. That timestamp can then be used later during the processing of the request to determine elapsed time or to print the total request time in an access log when the request is complete. This will also aid with tracking down performance issues by making it easy to log elapsed time during different portions of request processing.
Proposed patches attached. One adds the timestamp to the Request object, the other modifies the access log output to include the total request elapsed time in milliseconds.