From bf07ba350c4a9d6869abe2e789a01529c4143093 Mon Sep 17 00:00:00 2001 From: des Date: Fri, 20 Jul 2007 08:40:33 +0000 Subject: [PATCH] Count backend requests. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1729 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_fetch.c | 3 +++ varnish-cache/include/stat_field.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/varnish-cache/bin/varnishd/cache_fetch.c b/varnish-cache/bin/varnishd/cache_fetch.c index 0e0a80bf..2f2021f5 100644 --- a/varnish-cache/bin/varnishd/cache_fetch.c +++ b/varnish-cache/bin/varnishd/cache_fetch.c @@ -286,6 +286,9 @@ Fetch(struct sess *sp) return (1); } + /* XXX is this the right place? */ + VSL_stats->backend_req++; + CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC); CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC); diff --git a/varnish-cache/include/stat_field.h b/varnish-cache/include/stat_field.h index d944d0a8..5e7a80c8 100644 --- a/varnish-cache/include/stat_field.h +++ b/varnish-cache/include/stat_field.h @@ -89,3 +89,5 @@ MAC_STAT(sm_nreq, uint64_t, 'a', "allocator requests") MAC_STAT(sm_nobj, uint64_t, 'i', "outstanding allocations") MAC_STAT(sm_balloc, uint64_t, 'i', "bytes allocated") MAC_STAT(sm_bfree, uint64_t, 'i', "bytes free") + +MAC_STAT(backend_req, uint64_t, 'a', "Backend requests made") -- 2.39.5