MySQL 8.0.31
Source Code Documentation
ib::Throttler Class Reference

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 ()
 
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 Attributes

std::atomic< uint64_t > m_last_applied_time
 

Static Private Attributes

static constexpr uint64_t THROTTLE_DELAY_SEC = 10
 Throttle all items within that amount seconds from the last non throttled one. More...
 

Detailed Description

Allows to monitor an event processing times, allowing to throttle the processing to one per THROTTLE_DELAY_SEC.

Constructor & Destructor Documentation

◆ Throttler()

ib::Throttler::Throttler ( )
inline

Member Function Documentation

◆ apply()

bool ib::Throttler::apply ( )
inline

Checks if the item should be processed or ignored to not process them more frequently than one per THROTTLE_DELAY_SEC.

Member Data Documentation

◆ m_last_applied_time

std::atomic<uint64_t> ib::Throttler::m_last_applied_time
private

◆ THROTTLE_DELAY_SEC

constexpr uint64_t ib::Throttler::THROTTLE_DELAY_SEC = 10
staticconstexprprivate

Throttle all items within that amount seconds from the last non throttled one.


The documentation for this class was generated from the following file: