![]() |
algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
|
A rate limiter's counters per traffic class, its current budget, and the broker's refusals (from RateLimitController::stats). More...
#include <algotradelib/src/network/rate_limit.hpp>
Public Member Functions | |
| RateLimitGroupStats & | group (RateLimitGroup value) |
| Returns the counters for one traffic class. | |
| const RateLimitGroupStats & | group (RateLimitGroup value) const |
| Returns the counters for one traffic class. | |
Public Attributes | |
| RateLimitGroupStats | groups_ [rate_limit_group_count] |
| The counters per traffic class; read them with group(). | |
| int | burst_ {0} |
| The burst in force. | |
| int | per_second_ {0} |
| The sustained rate in force. | |
| int | available_ {0} |
| How much of the burst was unspent just after the last admitted request (for that request's class); not updated otherwise. | |
| std::uint64_t | broker_rejections_ {0} |
| How many rate-limit refusals the broker sent; if it keeps rising, lower the budget. | |
A rate limiter's counters per traffic class, its current budget, and the broker's refusals (from RateLimitController::stats).
Definition at line 359 of file rate_limit.hpp.
|
inline |
Returns the counters for one traffic class.
| value | The class. |
Definition at line 376 of file rate_limit.hpp.
|
inline |
Returns the counters for one traffic class.
| value | The class. |
Definition at line 385 of file rate_limit.hpp.
| int algotradelib::network::RateLimitStats::available_ {0} |
How much of the burst was unspent just after the last admitted request (for that request's class); not updated otherwise.
Definition at line 367 of file rate_limit.hpp.
| std::uint64_t algotradelib::network::RateLimitStats::broker_rejections_ {0} |
How many rate-limit refusals the broker sent; if it keeps rising, lower the budget.
Definition at line 369 of file rate_limit.hpp.
| int algotradelib::network::RateLimitStats::burst_ {0} |
The burst in force.
Definition at line 363 of file rate_limit.hpp.
| RateLimitGroupStats algotradelib::network::RateLimitStats::groups_[rate_limit_group_count] |
The counters per traffic class; read them with group().
Definition at line 361 of file rate_limit.hpp.
| int algotradelib::network::RateLimitStats::per_second_ {0} |
The sustained rate in force.
Definition at line 365 of file rate_limit.hpp.