Sub-second granularity logs

Niall O'Higgins niallo at metaweb.com
Thu Sep 10 23:27:40 CEST 2009


Hi all,

I am currently working on a custom logger for Varnish.  One of the
things we need is sub-second granularity for the start request log
event (millisecond).

It seems that currently Varnish only writes timestamps with a
granularity of one second.

I imagine that the reason for not providing finer-grained timestamps is
to avoid additional gettimeofday(2) system calls.  That makes sense,
however for our application, we are probably willing to take the
performance hit for higher accuracy in our statistics.

So, any thoughts or hints on this feature?  I am starting work on a
patch to implement this for our own needs, if there was general interest
from the community I'd be happy to contribute it back, and take into
account any feedback.

Thanks.

-- 
Niall O'Higgins
Software Engineer
Metaweb Technologies, Inc.



More information about the varnish-misc mailing list