MySQL 9.1.0
Source Code Documentation
|
Allows to monitor an event processing times, allowing to throttle the processing to one per throttle_delay_sec. More...
#include <ut0ut.h>
Public Member Functions | |
Throttler (seconds delay=seconds{10}) | |
bool | apply () |
Checks if the item should be processed or ignored to not process them more frequently than one per throttle_delay_sec. More... | |
Private Types | |
using | seconds = std::chrono::duration< uint64_t > |
using | clock = std::chrono::steady_clock |
using | time_point = std::chrono::time_point< clock, seconds > |
Private Attributes | |
std::atomic< time_point > | m_last_applied_time |
const seconds | m_throttle_delay |
Throttle all items within that amount seconds from the last non throttled one. More... | |
Allows to monitor an event processing times, allowing to throttle the processing to one per throttle_delay_sec.
|
private |
|
private |
|
private |
|
inline |
Checks if the item should be processed or ignored to not process them more frequently than one per throttle_delay_sec.
|
private |
|
private |
Throttle all items within that amount seconds from the last non throttled one.