1 #include "mfextensions/Extensions/throttle.hh"
14 if (!in_use_)
return false;
16 if (!boost::regex_match(name, what_, expr_))
return false;
26 return count_ > limit_ ?
true :
false;
30 if (sec - last_window_start_ > timespan_) {
31 last_window_start_ = sec;
37 return count_ > limit_ ?
true :
false;
throttle(std::string const &name, int limit, long timespan)
Throttle messages using a regular expression if they occurr above a certain frequency ...
bool reach_limit(std::string const &name, timeval tm)
Determine whether the name has reached the throttling limit