From 7837c523b8da7ac90c6efbb3de12855978ecaecf Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 19 Dec 2011 12:34:19 +0100 Subject: additional counter for lost messages due to failed actions added --- action.c | 5 +++++ action.h | 1 + 2 files changed, 6 insertions(+) diff --git a/action.c b/action.c index 49eb3663..66d7b55c 100644 --- a/action.c +++ b/action.c @@ -341,6 +341,10 @@ actionConstructFinalize(action_t *pThis) CHKiRet(statsobj.AddCounter(pThis->statsobj, UCHAR_CONSTANT("processed"), ctrType_IntCtr, &pThis->ctrProcessed)); + STATSCOUNTER_INIT(pThis->ctrFail, pThis->mutCtrFail); + CHKiRet(statsobj.AddCounter(pThis->statsobj, UCHAR_CONSTANT("failed"), + ctrType_IntCtr, &pThis->ctrFail)); + CHKiRet(statsobj.ConstructFinalize(pThis->statsobj)); /* create our queue */ @@ -1099,6 +1103,7 @@ submitBatch(action_t *pAction, batch_t *pBatch, int nElem) && pBatch->pElem[i].state != BATCH_STATE_COMM ) { pBatch->pElem[i].state = BATCH_STATE_BAD; pBatch->pElem[i].bPrevWasSuspended = 1; + STATSCOUNTER_INC(pAction->ctrFail, pAction->mutCtrFail); } } bDone = 1; diff --git a/action.h b/action.h index 310ef114..7a283a4a 100644 --- a/action.h +++ b/action.h @@ -92,6 +92,7 @@ struct action_s { /* for statistics subsystem */ statsobj_t *statsobj; STATSCOUNTER_DEF(ctrProcessed, mutCtrProcessed); + STATSCOUNTER_DEF(ctrFail, mutCtrFail); }; -- cgit