Sub-second granularity logs
Poul-Henning Kamp
phk at phk.freebsd.dk
Thu Sep 10 23:33:09 CEST 2009
In message <20090910212740.GV6403 at digdug.corp.631h.metaweb.com>, Niall O'Higgin
s writes:
>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).
All the internal timestamps are in nanosecond resolution, just
find the right printf and fix the format.
Getting a timespec is just as expensive as getting a time_t, because
time(2) simply calls clock_gettime(2) under your feet.
Which shmrecord are we talking about ?
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the varnish-misc
mailing list