From 0ac597ca41fdeacbe7c7e8fbe92981782a7763b3 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Thu, 15 Feb 2018 17:47:40 +0100 Subject: Do not clear statistics on read --- src/ManagementServer.h | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src/ManagementServer.h') diff --git a/src/ManagementServer.h b/src/ManagementServer.h index fcdbc16..1b432d5 100644 --- a/src/ManagementServer.h +++ b/src/ManagementServer.h @@ -151,10 +151,6 @@ class InputStat ~InputStat(); void registerAtServer(void); - // Gets called each time the statistics are transmitted, - // and resets the counters to zero - void reset(void); - std::string get_name(void) const { return m_name; } /* This function is called for every frame read by @@ -170,9 +166,10 @@ class InputStat std::string m_name; /************ STATISTICS ***********/ - // minimum and maximum buffer fill since last reset - long min_fill_buffer; - long max_fill_buffer; + // Calculate minimum and maximum buffer fill from + // a FIFO of values from the last few seconds + std::deque buffer_fill_stats; + std::chrono::time_point time_last_buffer_notify; // counter of number of overruns and underruns since startup uint32_t num_underruns; @@ -189,8 +186,6 @@ class InputStat int m_glitch_counter; // saturating counter int m_silence_counter; // saturating counter time_t m_time_last_event; - time_t m_time_last_buffer_nonempty; - bool m_buffer_empty; // The mutex that has to be held during all notify and readout mutable boost::mutex m_mutex; -- cgit v1.2.3