Is request time available in VCL?
Jean-Baptiste Quenot
jbq at caraldi.com
Tue Jan 25 12:40:29 CET 2011
Hi,
I'm using a varnishncsa patch that logs how long the server took to reply:
case SLT_ReqEnd:
if (sscanf(ptr, "%*u %*u.%*u %ld.%*u %lf %lf %lf", &l,
&idle_t, &proc_t, &xmit_t) != 4) {
lp->bogus = 1;
} else {
t = l;
lp->df_D= (proc_t + xmit_t) * 1000000;
localtime_r(&t, &lp->df_t);
}
/* got it all */
return (0);
I'd like to add a X-Varnish-Time header in the response to indicate
the same number, for service health checks. Is this time information
available in VCL?
Thanks in advance,
--
Jean-Baptiste Quenot
More information about the varnish-dev
mailing list