FIFO overflows can occur repeatedly when a consumer cannot keep up with
the incoming data rate. Logging every overflow can flood the application
logs and obscure other messages, while providing little additional
information about the underlying problem.
Rate-limit overflow messages from DataFifo and SampleSinkFifo while
continuing to report every overflow through the SampleSinkFifo signal.
Accumulate the number of dropped samples and overflow events during the
suppression interval and report them as a single aggregate message.
After reporting the aggregate, require a quiet recovery interval before
resuming immediate overflow reporting. This limits log volume while
retaining useful information about the severity and duration of FIFO
overruns.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
@ -118,6 +160,7 @@ unsigned int DataFifo::write(const quint8* data, unsigned int count, DataType da
@@ -118,6 +160,7 @@ unsigned int DataFifo::write(const quint8* data, unsigned int count, DataType da
if(dataType!=m_currentDataType)
{
m_suppressed=-1;
m_suppressedSamples=0;
m_fill=0;
m_head=0;
m_tail=0;
@ -164,6 +207,7 @@ unsigned int DataFifo::write(QByteArray::const_iterator begin, QByteArray::const
@@ -164,6 +207,7 @@ unsigned int DataFifo::write(QByteArray::const_iterator begin, QByteArray::const