summaryrefslogtreecommitdiffstats
path: root/action.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-12-19 14:24:09 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2011-12-19 14:24:09 +0100
commiteb6ee672e4f649200c84c8d74bb142b749778d47 (patch)
treeee43cc175081070e9f89dc5adcecf211da28c224 /action.c
parent76a5a1b8356610233bb70fc2d4c32b03aa42bd75 (diff)
parent32203be41af9c682a4f81c629f08b0593d755f69 (diff)
downloadrsyslog-eb6ee672e4f649200c84c8d74bb142b749778d47.tar.gz
rsyslog-eb6ee672e4f649200c84c8d74bb142b749778d47.tar.xz
rsyslog-eb6ee672e4f649200c84c8d74bb142b749778d47.zip
Merge branch 'v5-stable-newstats' into v5-devel
Conflicts: configure.ac
Diffstat (limited to 'action.c')
-rw-r--r--action.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/action.c b/action.c
index 656d3282..10436bf6 100644
--- a/action.c
+++ b/action.c
@@ -1623,14 +1623,16 @@ doQueueEnqObjDirectBatch(action_t *pAction, batch_t *pBatch)
pBatch->pElem[i].bFilterOK = 0;
bModifiedFilter = 1;
}
- if(pBatch->pElem[i].bFilterOK)
+ if(pBatch->pElem[i].bFilterOK) {
+ STATSCOUNTER_INC(pAction->ctrProcessed, pAction->mutCtrProcessed);
bNeedSubmit = 1;
+ }
DBGPRINTF("action %p[%d]: filterOK:%d state:%d execWhenPrev:%d prevWasSusp:%d\n",
pAction, i, pBatch->pElem[i].bFilterOK, pBatch->pElem[i].state,
pAction->bExecWhenPrevSusp, pBatch->pElem[i].bPrevWasSuspended);
}
if(bNeedSubmit) {
- countStatsBatchEnq(pAction, pBatch);
+ /* note: stats were already computed above */
iRet = qqueueEnqObjDirectBatch(pAction->pQueue, pBatch);
} else {
DBGPRINTF("no need to submit batch, all bFilterOK==0\n");
@@ -1645,7 +1647,8 @@ doQueueEnqObjDirectBatch(action_t *pAction, batch_t *pBatch)
}
}
} else {
- countStatsBatchEnq(pAction, pBatch);
+ if(GatherStats)
+ countStatsBatchEnq(pAction, pBatch);
iRet = qqueueEnqObjDirectBatch(pAction->pQueue, pBatch);
}