Fixed window rate limiter for logging.
Declared in <logging.h>
class LogRateLimiter;
| Name | Description |
|---|---|
Stats | Keeps track of an individual source location and how many available bytes are left for logging from it. |
| Name | Description |
|---|---|
SchedulerFunction | Callback type used to schedule the periodic reset of the rate-limit window. |
| Name | Description |
|---|---|
Status | Suppression status of a source log location. |
| Name | Description |
|---|---|
Consume | Consumes source_loc's available bytes corresponding to the size of the (formatted) str and returns its status. |
Reset | Resets all usage to zero. Called periodically by the scheduler. |
SuppressionsActive | Returns true if any log locations are currently being suppressed. |
| Name | Description |
|---|---|
Create | Create a shared rate limiter and schedule its periodic window reset. |
| Name | Description |
|---|---|
m_max_bytes | Maximum number of bytes logged per location per window. |
m_reset_window | Interval after which the window is reset. |