From b7a03abefc52df5586e004bf5464cb8a98c9d406 Mon Sep 17 00:00:00 2001 From: phk Date: Thu, 31 Jul 2008 09:25:25 +0000 Subject: [PATCH] Make separate stats counters for number of object checked against purges and number of regexps checked. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3037 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_ban.c | 3 ++- varnish-cache/include/stat_field.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/varnish-cache/bin/varnishd/cache_ban.c b/varnish-cache/bin/varnishd/cache_ban.c index c4f3f27a..050d0983 100644 --- a/varnish-cache/bin/varnishd/cache_ban.c +++ b/varnish-cache/bin/varnishd/cache_ban.c @@ -176,7 +176,8 @@ BAN_CheckObject(struct object *o, const char *url, const char *hash) o->ban->refcount--; if (b == o->ban) /* not banned */ b0->refcount++; - VSL_stats->n_purge_test++; + VSL_stats->n_purge_obj_test++; + VSL_stats->n_purge_re_test += tests; UNLOCK(&ban_mtx); if (b == o->ban) { /* not banned */ diff --git a/varnish-cache/include/stat_field.h b/varnish-cache/include/stat_field.h index 6d095fbd..b46e26c1 100644 --- a/varnish-cache/include/stat_field.h +++ b/varnish-cache/include/stat_field.h @@ -120,4 +120,5 @@ MAC_STAT(n_vcl_discard, uint64_t, 'a', "N vcl discarded") MAC_STAT(n_purge, uint64_t, 'i', "N total active purges") MAC_STAT(n_purge_add, uint64_t, 'a', "N new purges added") MAC_STAT(n_purge_retire, uint64_t, 'a', "N old purges deleted") -MAC_STAT(n_purge_test, uint64_t, 'a', "N purge record tests") +MAC_STAT(n_purge_obj_test, uint64_t, 'a', "N objects tested") +MAC_STAT(n_purge_re_test, uint64_t, 'a', "N regexps tested against") -- 2.39.5