r1729 - in trunk/varnish-cache: bin/varnishd include

des at projects.linpro.no des at projects.linpro.no
Fri Jul 20 10:40:33 CEST 2007


Author: des
Date: 2007-07-20 10:40:33 +0200 (Fri, 20 Jul 2007)
New Revision: 1729

Modified:
   trunk/varnish-cache/bin/varnishd/cache_fetch.c
   trunk/varnish-cache/include/stat_field.h
Log:
Count backend requests.


Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_fetch.c	2007-07-20 08:39:45 UTC (rev 1728)
+++ trunk/varnish-cache/bin/varnishd/cache_fetch.c	2007-07-20 08:40:33 UTC (rev 1729)
@@ -286,6 +286,9 @@
 		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);

Modified: trunk/varnish-cache/include/stat_field.h
===================================================================
--- trunk/varnish-cache/include/stat_field.h	2007-07-20 08:39:45 UTC (rev 1728)
+++ trunk/varnish-cache/include/stat_field.h	2007-07-20 08:40:33 UTC (rev 1729)
@@ -89,3 +89,5 @@
 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")




More information about the varnish-commit mailing list