DUNE-DAQ
DUNE Trigger and Data Acquisition software
|
Throws issues as exceptions. More...
#include <ThrottleStream.hpp>
Classes | |
class | IssueRecord |
Public Member Functions | |
ThrottleStream (const std::string &criteria) | |
void | write (const ers::Issue &issue) override |
![]() | |
virtual | ~OutputStream () |
Sends the issue into this stream. | |
Private Types | |
typedef std::map< std::string, IssueRecord > | IssueMap |
Private Member Functions | |
void | throttle (IssueRecord &record, const ers::Issue &issue) |
void | reportSuppression (IssueRecord &record, const ers::Issue &issue) |
Private Attributes | |
IssueMap | m_issueMap |
int | m_initialThreshold |
int | m_timeLimit |
std::mutex | m_mutex |
Additional Inherited Members | |
![]() | |
OutputStream () | |
OutputStream & | chained () |
virtual bool | isNull () const |
Throws issues as exceptions.
This class implements a stream that swallows identical issues if they are sent to the given stream too often. In order to employ this implementation in a stream configuration the name to be used is "throttle". E.g. the following configuration will suppress identical issues from been printed to the standard output:
export DUNEDAQ_ERS_FATAL="throttle(10, 20),stdout"
This stream has two configuration parameters:
Definition at line 34 of file ThrottleStream.hpp.
|
private |
Definition at line 59 of file ThrottleStream.hpp.
|
explicit |
|
private |
|
private |
|
overridevirtual |
Implements ers::OutputStream.
|
private |
Definition at line 62 of file ThrottleStream.hpp.
|
private |
Definition at line 60 of file ThrottleStream.hpp.
|
private |
Definition at line 64 of file ThrottleStream.hpp.
|
private |
Definition at line 63 of file ThrottleStream.hpp.