tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: AccessLogValve pattern (timestamp, bytes sent and time taken)
Date Sun, 27 Feb 2011 19:43:58 GMT
2011/2/21 Antonios Kogias <coyas@hua.gr>:
> Thank you very much for the detailed answer. Now there's just one more thing
> to ask.
> If we use tomcat 7.0.8, the "timing for the whole request processing cycle"
> will incorporate transmit time?
> e.g. if using HTTP/1.0, will it represent the total time until the teardown
> of the connection? Or will it be the net processing time /before/
> transmission starts (i.e. time to prepare the http response and push it to
> the network layer)?

In TC 7.0.8 and later:

The start time:
= when org.apache.coyote.Request#setStartTime() is called

That is done by processors. Some initial processing is already done at
that point (e.g. reading the request line).

The end time:
= when org.apache.catalina.connector.CoyoteAdapter#service() calls logAccess(..)

That is done when service() completes processing the request. At that
point the content is already generated and response.finishResponse()
is already called (which closes output buffer and writes remaining
data to the socket).

After that Tomcat performs cleaning of its internal state and is ready
to process next request.

I am not sure what you mean by "teardown".


A correction: I wrote:

> In latest versions of TC7 (7.0.8 and later) (...)
> That version prints timestamp when request was received

That is not true. With %t the AccessLogValve still prints the current
time when logging is performed, not when processing was started.
(There was a patch discussed on dev@ to change the behaviour, but it
has not been applied yet).


BTW, if you want to debug Tomcat,
http://wiki.apache.org/tomcat/FAQ/Developing

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message