Bug 55102 - Add ability to report time taken to prepare response
Summary: Add ability to report time taken to prepare response
Status: CLOSED FIXED
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 8.0.x-trunk
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ----
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-15 17:09 UTC by Jeremy Boynes
Modified: 2013-07-08 16:12 UTC (History)
0 users



Attachments
Patch against trunk@r1493385 to record and output time to commit (2.62 KB, text/plain)
2013-06-15 17:09 UTC, Jeremy Boynes
Details
Documentation for %F AccessLogValve parameter (1.13 KB, patch)
2013-06-22 15:54 UTC, Jeremy Boynes
Details | Diff
Documentation for %F AccessLogValve parameter (1.14 KB, text/plain)
2013-06-22 16:01 UTC, Jeremy Boynes
Details
Backport to 7.0.x branch (3.63 KB, text/plain)
2013-06-22 16:05 UTC, Jeremy Boynes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Boynes 2013-06-15 17:09:47 UTC
Created attachment 30438 [details]
Patch against trunk@r1493385 to record and output time to commit

Tomcat's AccessLogValve is able to report the time taken to send an entire request using %D. This is the total processing time and may be affected by network conditions. It is sometimes useful to be able to record the time taken by the server to prepare the response and send the first content to the client.

Attached is a patch that records the time the response is committed and then allows that to be reported in the access log using a '%F' pattern (which is the same as used by the mod-log-firstbyte module for HTTPD).
Comment 1 Jeremy Boynes 2013-06-15 17:10:14 UTC
Related post on users list:
http://markmail.org/thread/vq3n2igy7q5fttc4
Comment 2 Mark Thomas 2013-06-20 21:42:24 UTC
Generally the patch looks good to me.

It is missing documentation. Other than that I see no reason not to add it to trunk and 7.0.x.
Comment 3 Jeremy Boynes 2013-06-22 15:54:54 UTC
Created attachment 30473 [details]
Documentation for %F AccessLogValve parameter

Add documentation in the docs webapp
Comment 4 Jeremy Boynes 2013-06-22 16:01:53 UTC
Created attachment 30474 [details]
Documentation for %F AccessLogValve parameter

Minor change to add username to bug line from previous patch
Comment 5 Jeremy Boynes 2013-06-22 16:05:29 UTC
Created attachment 30475 [details]
Backport to 7.0.x branch
Comment 6 Mark Thomas 2013-06-23 20:26:17 UTC
Thanks for the patches. They have been applied (with minor modifications) to trunk and 7.0.x and will be included in 7.0.42 onwards.