]> err.no Git - varnish/commitdiff
Add a counter for shmlog wraparounds.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 22 Jul 2008 14:40:33 +0000 (14:40 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 22 Jul 2008 14:40:33 +0000 (14:40 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2993 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/shmlog.c
varnish-cache/include/stat_field.h

index c2d6cb6606f8f87f304159f1e01a65d6419bcc7c..47a99247adf70c79a9af7ccee561f4e58ab76cac 100644 (file)
@@ -74,6 +74,7 @@ vsl_wrap(void)
        *logstart = SLT_ENDMARKER;
        logstart[loghead->ptr] = SLT_WRAPMARKER;
        loghead->ptr = 0;
+       VSL_stats->shm_cycles++;
 }
 
 static void
index d3ea7e657e8e7710509ade9e2570f024819ea6ac..217d23055b0ec9779e0ba165420bed0acde47968 100644 (file)
@@ -92,6 +92,7 @@ MAC_STAT(shm_records,         uint64_t, 'a', "SHM records")
 MAC_STAT(shm_writes,           uint64_t, 'a', "SHM writes")
 MAC_STAT(shm_flushes,          uint64_t, 'a', "SHM flushes due to overflow")
 MAC_STAT(shm_cont,             uint64_t, 'a', "SHM MTX contention")
+MAC_STAT(shm_cycles,           uint64_t, 'a', "SHM cycles through buffer")
 
 MAC_STAT(sm_nreq,              uint64_t, 'a', "allocator requests")
 MAC_STAT(sm_nobj,              uint64_t, 'i', "outstanding allocations")