From c0b69e4e6fa58db42efc13f115ff9fdae8d0ad48 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Fri, 5 Feb 2016 12:28:59 -0500 Subject: [PATCH] add monitor buffer statistics to help answer the question of why no monitorEvent()s are happening. --- src/monitor/pv/monitor.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/monitor/pv/monitor.h b/src/monitor/pv/monitor.h index 6d1312e..54ac1d1 100644 --- a/src/monitor/pv/monitor.h +++ b/src/monitor/pv/monitor.h @@ -80,6 +80,16 @@ class epicsShareClass Monitor : public Destroyable{ * @param monitorElement */ virtual void release(MonitorElementPtr const & monitorElement) = 0; + + struct Stats { + size_t nfilled; //!< # of elements ready to be poll()d + size_t noutstanding; //!< # of elements poll()d but not released()d + size_t nempty; //!< # of elements available for new remote data + }; + + virtual void getStats(Stats& s) const { + s.nfilled = s.noutstanding = s.nempty = 0; + } };