Re: Measuring response time Apache request
"Cosimo Streppone" <[email protected]>
| Newsgroups | gmane.comp.apache.mod-perl |
|---|---|
| Message-ID | <op.vv0gzapes5ttvb@mote> |
On Wed, 25 May 2011 02:20:23 +1000, André Warnier <[email protected]> wrote: > marco wrote: >> Il 24/05/2011 17.35, Adam Prime ha scritto: >>> On 11-05-24 11:30 AM, marco wrote: >>>> Hi all, >>>> I want to get the response time that Apache spends to serve a request >>>> (from post-read-request phase to the response phase). >>>> Any idea? > See : http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#formats > (parameter %D) Hi Marco, I also use "%D" as André suggested. Add "%D" to your LogFormat string, unless you need to do something in your application with the request time, like for example include it in a html comment. If you're using Debian/Ubuntu, just change your LogFormat or create a file like "/etc/apache2/conf.d/log-request-time" with: LogFormat "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" time:%D" combined that should be it. -- Cosimo