From 3dd44b02d6251c519b04c3147425622603dd4754 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 5 Jul 2012 17:15:07 +0200 Subject: debug log: emit (some) action queue parameters to debug log --- runtime/queue.c | 26 ++++++++++++++++++++++++++ runtime/queue.h | 1 + 2 files changed, 27 insertions(+) (limited to 'runtime') diff --git a/runtime/queue.c b/runtime/queue.c index a2f80d29..6b85f013 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -225,6 +225,32 @@ finalize_it: /* methods */ +void +qqueueDbgPrint(qqueue_t *pThis) +{ + dbgoprint((obj_t*) pThis, "size %d messages.\n", pThis->iMaxQueueSize); + dbgoprint((obj_t*) pThis, "worker threads: %d, wThread shutdown: %d, Perists every %d updates.\n", + pThis->iNumWorkerThreads, pThis->toWrkShutdown, pThis->iPersistUpdCnt); + dbgoprint((obj_t*) pThis, "queue timeouts: shutdown: %d, action completion shutdown: %d, enq: %d\n", + pThis->toQShutdown, pThis->toActShutdown, pThis->toEnq); + dbgoprint((obj_t*) pThis, "queue watermarks: high: %d, low: %d, discard: %d, discard-severity: %d\n", + pThis->iHighWtrMrk, pThis->iLowWtrMrk, + pThis->iDiscardMrk, pThis->iDiscardSeverity); + dbgoprint((obj_t*) pThis, "queue save on shutdown %d, max disk space allowed %lld\n", + pThis->bSaveOnShutdown, pThis->sizeOnDiskMax); + dbgoprint((obj_t*) pThis, "dequeueBatchSize: %d\n", pThis->iDeqBatchSize); + /* TODO: add + iActionRetryCount = 0; + iActionRetryInterval = 30000; + static int iMainMsgQtoWrkMinMsgs = 100; + static int iMainMsgQbSaveOnShutdown = 1; + iMainMsgQueMaxDiskSpace = 0; + setQPROP(qqueueSetiMinMsgsPerWrkr, "$MainMsgQueueWorkerThreadMinimumMessages", 100); + setQPROP(qqueueSetbSaveOnShutdown, "$MainMsgQueueSaveOnShutdown", 1); + */ +} + + /* get the physical queue size. Must only be called * while mutex is locked! * rgerhards, 2008-01-29 diff --git a/runtime/queue.h b/runtime/queue.h index 3841615a..edb770c6 100644 --- a/runtime/queue.h +++ b/runtime/queue.h @@ -195,6 +195,7 @@ rsRetVal qqueueEnqObjDirectBatch(qqueue_t *pThis, batch_t *pBatch); rsRetVal qqueueDoCnfParams(struct nvlst *lst, struct cnfparamvals **ppvals); rsRetVal qqueueApplyCnfParam(qqueue_t *pThis, struct cnfparamvals *pvals); void qqueueSetDefaultsActionQueue(qqueue_t *pThis); +void qqueueDbgPrint(qqueue_t *pThis); PROTOTYPEObjClassInit(qqueue); PROTOTYPEpropSetMeth(qqueue, iPersistUpdCnt, int); -- cgit