summaryrefslogtreecommitdiffstats
path: root/runtime/queue.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-09-13 15:43:56 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2010-09-13 15:43:56 +0200
commite86cb62f1299ef18732f7b3b87d45a840ee38f1e (patch)
tree8e346e0c74431c09ea174d63bebae80fb7761ef9 /runtime/queue.h
parent3d50fd6a67b7d0bf31628aea14128a47dd5d326f (diff)
downloadrsyslog-e86cb62f1299ef18732f7b3b87d45a840ee38f1e.tar.gz
rsyslog-e86cb62f1299ef18732f7b3b87d45a840ee38f1e.tar.xz
rsyslog-e86cb62f1299ef18732f7b3b87d45a840ee38f1e.zip
improved statistics-gathering subsystem
... well, actually this is a first real implementation of this subsystem. I have added a counter registry, a way to access the countres (as readable string) and a way to define and maintem them. Also, module impstats has been updated to utilize the new system. Finally, I added some counters. I hope that this sets the baseline for useful future enhancements.
Diffstat (limited to 'runtime/queue.h')
-rw-r--r--runtime/queue.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/queue.h b/runtime/queue.h
index 1c758134..38e248cd 100644
--- a/runtime/queue.h
+++ b/runtime/queue.h
@@ -29,6 +29,7 @@
#include "wtp.h"
#include "batch.h"
#include "stream.h"
+#include "statsobj.h"
/* support for the toDelete list */
typedef struct toDeleteLst_s toDeleteLst_t;
@@ -165,6 +166,11 @@ struct queue_s {
} tVars;
DEF_ATOMIC_HELPER_MUT(mutQueueSize);
DEF_ATOMIC_HELPER_MUT(mutLogDeq);
+ /* for statistics subsystem */
+ statsobj_t *statsobj;
+ STATSCOUNTER_DEF(ctrEnqueued, mutCtrEnqueued);
+ STATSCOUNTER_DEF(ctrFull, mutCtrFull);
+ int ctrMaxqsize;
};