]> err.no Git - varnish/commitdiff
Add a stats field to monitor the LRU move rate.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 18 Feb 2008 09:59:08 +0000 (09:59 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 18 Feb 2008 09:59:08 +0000 (09:59 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2506 d4fa192b-c00b-0410-8231-f00ffab90ce4

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

index 5381a7012f707ef784a0eb9121eca6386c98c72b..f12d1b08fceb4646de2bec471604f8f3cb345252 100644 (file)
@@ -106,6 +106,7 @@ EXP_Touch(struct object *o, double now)
        CHECK_OBJ_NOTNULL(o, OBJECT_MAGIC);
        if (o->lru_stamp + params->lru_timeout < now) {
                LOCK(&exp_mtx); /* XXX: should be ..._TRY */
+               VSL_stats->n_lru_moved++;
                if (o->timer_idx != lru_target && o->timer_idx != 0) {
                        VTAILQ_REMOVE(&exp_lru, o, deathrow);
                        VTAILQ_INSERT_TAIL(&exp_lru, o, deathrow);
index f2736d29032493049f62e8e1a73a245aa78fdb32..90baaa125e69a5669cb6b39c41369e72722da6aa 100644 (file)
@@ -65,6 +65,7 @@ MAC_STAT(n_backend,           uint64_t, 'i', "N backends")
 MAC_STAT(n_expired,            uint64_t, 'i', "N expired objects")
 MAC_STAT(n_lru_nuked,          uint64_t, 'i', "N LRU nuked objects")
 MAC_STAT(n_lru_saved,          uint64_t, 'i', "N LRU saved objects")
+MAC_STAT(n_lru_moved,          uint64_t, 'i', "N LRU moved objects")
 MAC_STAT(n_deathrow,           uint64_t, 'i', "N objects on deathrow")
 
 MAC_STAT(losthdr,              uint64_t, 'a', "HTTP header overflows")