#include <userver/utils/statistics/striped_rate_counter.hpp>
Atomic counter of type Rate with relaxed memory ordering, increased memory consumption and decreased contention.
This class is represented as Rate metric when serializing to statistics.
Differences from utils::statistics::RateCounter:
8 * N_CORES
memory, while RateCounter is just a single atomic.Use StripedRateCounter instead of RateCounter sparingly, in places where a lot of threads are supposed to be hammering on the same metrics.
Definition at line 31 of file striped_rate_counter.hpp.
Public Types | |
using | ValueType = Rate |
Public Member Functions | |
StripedRateCounter (Rate desired) | |
StripedRateCounter (Rate::ValueType desired) | |
StripedRateCounter (const StripedRateCounter &other) | |
StripedRateCounter & | operator= (const StripedRateCounter &other) noexcept |
StripedRateCounter & | operator= (Rate desired) noexcept |
void | Store (Rate desired) noexcept |
Rate | Load () const noexcept |
void | Add (Rate arg) noexcept |
StripedRateCounter & | operator++ () noexcept |
StripedRateCounter & | operator+= (Rate arg) noexcept |
StripedRateCounter & | operator+= (const StripedRateCounter &arg) noexcept |
Definition at line 33 of file striped_rate_counter.hpp.
|
inlineexplicit |
Definition at line 37 of file striped_rate_counter.hpp.
|
inlineexplicit |
Definition at line 39 of file striped_rate_counter.hpp.
|
inline |
Definition at line 41 of file striped_rate_counter.hpp.
Definition at line 59 of file striped_rate_counter.hpp.
|
inlinenoexcept |
Definition at line 57 of file striped_rate_counter.hpp.
|
inlinenoexcept |
Definition at line 61 of file striped_rate_counter.hpp.
|
inlinenoexcept |
Definition at line 71 of file striped_rate_counter.hpp.
|
inlinenoexcept |
Definition at line 66 of file striped_rate_counter.hpp.
|
inlinenoexcept |
Definition at line 43 of file striped_rate_counter.hpp.
|
inlinenoexcept |
Definition at line 50 of file striped_rate_counter.hpp.
Definition at line 55 of file striped_rate_counter.hpp.