|
rippled
|
Run single metrics rolling average. More...
#include <TxMetrics.h>

Public Types | |
| using | clock_type = std::chrono::steady_clock |
Public Member Functions | |
| SingleMetrics (bool ptu=true) | |
| Class constructor. | |
| void | addMetrics (std::uint32_t val) |
| Add metrics value. | |
Public Attributes | |
| clock_type::time_point | intervalStart {clock_type::now()} |
| std::uint64_t | accum {0} |
| std::uint64_t | rollingAvg {0} |
| std::uint32_t | N {0} |
| bool | perTimeUnit {true} |
| boost::circular_buffer< std::uint64_t > | rollingAvgAggreg {30, 0ull} |
Run single metrics rolling average.
Can be either average of a value per second or average of a value's sample per second. For instance, for transaction it makes sense to have transaction bytes and count per second, but for a number of selected peers to relay per transaction it makes sense to have sample's average.
Definition at line 22 of file TxMetrics.h.
Definition at line 31 of file TxMetrics.h.
| ripple::metrics::SingleMetrics::SingleMetrics | ( | bool | ptu = true | ) |
Class constructor.
| ptu | if true then calculate metrics per second, otherwise sample's average |
Definition at line 28 of file TxMetrics.h.
| void ripple::metrics::SingleMetrics::addMetrics | ( | std::uint32_t | val | ) |
Add metrics value.
| val | metrics value, either bytes or count |
Definition at line 74 of file TxMetrics.cpp.
| clock_type::time_point ripple::metrics::SingleMetrics::intervalStart {clock_type::now()} |
Definition at line 32 of file TxMetrics.h.
| std::uint64_t ripple::metrics::SingleMetrics::accum {0} |
Definition at line 33 of file TxMetrics.h.
| std::uint64_t ripple::metrics::SingleMetrics::rollingAvg {0} |
Definition at line 34 of file TxMetrics.h.
| std::uint32_t ripple::metrics::SingleMetrics::N {0} |
Definition at line 35 of file TxMetrics.h.
| bool ripple::metrics::SingleMetrics::perTimeUnit {true} |
Definition at line 36 of file TxMetrics.h.
| boost::circular_buffer<std::uint64_t> ripple::metrics::SingleMetrics::rollingAvgAggreg {30, 0ull} |
Definition at line 37 of file TxMetrics.h.