[4.0] 2f017f0 Add two counters to keep track of the exp inbox traffic

Poul-Henning Kamp phk at FreeBSD.org
Thu Mar 13 10:24:23 CET 2014


commit 2f017f0d8f3c409a25722253c2480dbfa929048f
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Thu Jan 30 21:13:44 2014 +0000

    Add two counters to keep track of the exp inbox traffic

diff --git a/bin/varnishd/cache/cache_expire.c b/bin/varnishd/cache/cache_expire.c
index f1b65f3..eeda901 100644
--- a/bin/varnishd/cache/cache_expire.c
+++ b/bin/varnishd/cache/cache_expire.c
@@ -117,6 +117,7 @@ exp_mail_it(struct objcore *oc)
 		VTAILQ_INSERT_HEAD(&exphdl->inbox, oc, lru_list);
 	else
 		VTAILQ_INSERT_TAIL(&exphdl->inbox, oc, lru_list);
+	VSC_C_main->exp_mailed++;
 	AZ(pthread_cond_signal(&exphdl->condvar));
 	Lck_Unlock(&exphdl->mtx);
 }
@@ -583,6 +584,7 @@ exp_thread(struct worker *wrk, void *priv)
 		oc = VTAILQ_FIRST(&ep->inbox);
 		if (oc != NULL) {
 			VTAILQ_REMOVE(&ep->inbox, oc, lru_list);
+			VSC_C_main->exp_received++;
 			tnext = 0;
 		} else if (tnext > t) {
 			VSL_Flush(&ep->vsl, 0);
diff --git a/include/tbl/vsc_f_main.h b/include/tbl/vsc_f_main.h
index 9d7da8c..d72b325 100644
--- a/include/tbl/vsc_f_main.h
+++ b/include/tbl/vsc_f_main.h
@@ -561,6 +561,18 @@ VSC_F(bans_persisted_fragmentation,	uint64_t, 0, 'g', diag,
 
 /*--------------------------------------------------------------------*/
 
+VSC_F(exp_mailed,			uint64_t, 0, 'c', diag,
+    "Number of objects mailed to expiry thread",
+	"Number of objects mailed to expiry thread for handling."
+)
+
+VSC_F(exp_received,			uint64_t, 0, 'c', diag,
+    "Number of objects received by expiry thread",
+	"Number of objects received by expiry thread for handling."
+)
+
+/*--------------------------------------------------------------------*/
+
 VSC_F(hcb_nolock,		uint64_t, 1, 'a', debug,
     "HCB Lookups without lock",
 	""



More information about the varnish-commit mailing list