|
artdaq_mfextensions
v1_05_01
|
Throttle messages based on name and time limits. Separate from MessageFacility limiting. More...
#include <mfextensions/Extensions/throttle.hh>
Public Member Functions | |
| throttle (std::string const &name, int limit, int64_t timespan) | |
| Throttle messages using a regular expression if they occurr above a certain frequency More... | |
| bool | reach_limit (std::string const &name, timeval tm) |
| Determine whether the name has reached the throttling limit More... | |
| void | use (bool flag) |
| Enable or disable this throttle More... | |
Throttle messages based on name and time limits. Separate from MessageFacility limiting.
Definition at line 17 of file throttle.hh.
| throttle::throttle | ( | std::string const & | name, |
| int | limit, | ||
| int64_t | timespan | ||
| ) |
Throttle messages using a regular expression if they occurr above a certain frequency
| name | Regular expression to match messages |
| limit | Number of messages before throttling is enabled |
| timespan | Time limit for throttling |
Definition at line 3 of file throttle.cc.
| bool throttle::reach_limit | ( | std::string const & | name, |
| timeval | tm | ||
| ) |
Determine whether the name has reached the throttling limit
| name | Name to check against regular expression |
| tm | Time of message |
Definition at line 6 of file throttle.cc.
|
inline |
Enable or disable this throttle
| flag | Whether the throttle should be enabled |
Definition at line 40 of file throttle.hh.