rippled
|
A metric for measuring an integral value. More...
Public Types | |
using | value_type = GaugeImpl::value_type |
using | difference_type = GaugeImpl::difference_type |
Public Member Functions | |
Gauge () | |
Create a null metric. More... | |
Gauge (std::shared_ptr< GaugeImpl > const &impl) | |
Create the metric reference the specified implementation. More... | |
std::shared_ptr< GaugeImpl > const & | impl () const |
void | set (value_type value) const |
Set the value on the gauge. More... | |
Gauge const & | operator= (value_type value) const |
void | increment (difference_type amount) const |
Adjust the value of the gauge. More... | |
Gauge const & | operator+= (difference_type amount) const |
Gauge const & | operator-= (difference_type amount) const |
Gauge const & | operator++ () const |
Gauge const & | operator++ (int) const |
Gauge const & | operator-- () const |
Gauge const & | operator-- (int) const |
Private Attributes | |
std::shared_ptr< GaugeImpl > | m_impl |
A metric for measuring an integral value.
A gauge is an instantaneous measurement of a value, like the gas gauge in a car. The caller directly sets the value, or adjusts it by a specified amount. The value is kept in the client rather than the collector.
This is a lightweight reference wrapper which is cheap to copy and assign. When the last reference goes away, the metric is no longer collected.
beast::insight::Gauge::Gauge | ( | ) |
|
explicit |
void beast::insight::Gauge::set | ( | value_type | value | ) | const |
Gauge const& beast::insight::Gauge::operator= | ( | value_type | value | ) | const |
void beast::insight::Gauge::increment | ( | difference_type | amount | ) | const |
Gauge const& beast::insight::Gauge::operator+= | ( | difference_type | amount | ) | const |
Gauge const& beast::insight::Gauge::operator-= | ( | difference_type | amount | ) | const |
Gauge const& beast::insight::Gauge::operator++ | ( | int | ) | const |
Gauge const& beast::insight::Gauge::operator-- | ( | int | ) | const |
std::shared_ptr<GaugeImpl> const& beast::insight::Gauge::impl | ( | ) | const |
|
private |