Wire Sysio Wire Sysion 1.0.0
|
#include <resource_limits_private.hpp>
Public Member Functions | |
exponential_decay_accumulator () | |
uint64_t | value_ex_at (uint32_t ordinal, uint32_t window_size) const |
uint64_t | value_at (uint32_t ordinal, uint32_t window_size) const |
void | add (uint64_t units, uint32_t ordinal, uint32_t window_size) |
Public Attributes | |
uint32_t | last_ordinal |
The ordinal of the last period which has contributed to the accumulator. | |
uint64_t | value_ex |
The current accumulated value pre-multiplied by Precision. | |
Static Public Attributes | |
static constexpr uint64_t | max_raw_value = std::numeric_limits<uint64_t>::max() / Precision |
This class accumulates a value that decays over quantums based on inputs The decay is linear between updates and exponential if the set of inputs has no gaps
The value stored is Precision times the sum of the inputs.
Definition at line 131 of file resource_limits_private.hpp.
|
inline |
Definition at line 136 of file resource_limits_private.hpp.
|
inline |
Definition at line 173 of file resource_limits_private.hpp.
|
inline |
return the value at a current or future ordinal
Definition at line 169 of file resource_limits_private.hpp.
|
inline |
return the extended value at a current or future ordinal
Definition at line 148 of file resource_limits_private.hpp.
uint32_t sysio::chain::resource_limits::impl::exponential_decay_accumulator< Precision >::last_ordinal |
Definition at line 142 of file resource_limits_private.hpp.
|
staticconstexpr |
Definition at line 134 of file resource_limits_private.hpp.
uint64_t sysio::chain::resource_limits::impl::exponential_decay_accumulator< Precision >::value_ex |
Definition at line 143 of file resource_limits_private.hpp.