httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Terbush <ra...@zyzzyva.com>
Subject Re: mod_log_config %T, keepalive
Date Tue, 17 Dec 1996 03:44:56 GMT

This probably explains some of the time discrepancies in SSI
variables. I think we should commit this for 1.2b3.



> I was just playing with something similar to %T (log_request_duration)
> from 1.2.  I'm still back in a 1.1.1 server, and just cloned the
> code that manipulates r->request_time.  What I noticed is that for
> keepalive connections this doesn't seem to be quite as documented.
> My interpretation of the docs would be that %T is a measurement of the
> time between when the server got a request and it finished serving it
> (approximately...  using the time that logging is invoked is fine).
> 
> What happens on keepalive is that %T actually includes how long the
> server spent blocked on the first read() of a new request.
> 
> This affects a few things that use r->request_time too... like mod_include.c.
> 
> So anyhow, if that's not what was the expected value for %T then consider
> this patch (against 1.2b2) a bug fix.
> 
> Hey btw, how portable is gettimeofday() ?  I'm actually interested in
> millisecond timing.
> 
> Dean
> 
> *** http_protocol.c.orig	Mon Dec 16 17:59:01 1996
> --- http_protocol.c	Mon Dec 16 18:02:28 1996
> ***************
> *** 518,523 ****
> --- 518,524 ----
>       if (len == (HUGE_STRING_LEN - 1))
>           return 0;               /* Should be a 414 error status instead */
>   
> +     r->request_time = time(NULL);
>       r->the_request = pstrdup (r->pool, l);
>       r->method = getword_white(r->pool, &ll);
>       uri = getword_white(r->pool, &ll);
> ***************
> *** 618,625 ****
>   request_rec *read_request (conn_rec *conn)
>   {
>       request_rec *r = (request_rec *)pcalloc (conn->pool, sizeof(request_rec));
> - 
> -     r->request_time = time(NULL);
>     
>       r->connection = conn;
>       r->server = conn->server;
> --- 619,624 ----




Mime
View raw message