diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-02-15 17:47:40 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-02-15 17:47:40 +0100 |
commit | 0ac597ca41fdeacbe7c7e8fbe92981782a7763b3 (patch) | |
tree | 035e44c16fef5d236a4e665a6d4e20345566ebeb /src/ManagementServer.h | |
parent | 7e5367bd6df7fbdb70dd3bd02d033d7bc26417d7 (diff) | |
download | dabmux-0ac597ca41fdeacbe7c7e8fbe92981782a7763b3.tar.gz dabmux-0ac597ca41fdeacbe7c7e8fbe92981782a7763b3.tar.bz2 dabmux-0ac597ca41fdeacbe7c7e8fbe92981782a7763b3.zip |
Do not clear statistics on read
Diffstat (limited to 'src/ManagementServer.h')
-rw-r--r-- | src/ManagementServer.h | 13 |
1 files changed, 4 insertions, 9 deletions
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<long> buffer_fill_stats; + std::chrono::time_point<std::chrono::steady_clock> 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; |