rippled
|
Interface for a manager that allows collection of metrics. More...
Public Types | |
using | ptr = std::shared_ptr< Collector > |
Public Member Functions | |
virtual | ~Collector ()=0 |
template<class Handler > | |
Hook | make_hook (Handler handler) |
Create a hook. More... | |
virtual Hook | make_hook (HookImpl::HandlerType const &handler)=0 |
virtual Counter | make_counter (std::string const &name)=0 |
Create a counter with the specified name. More... | |
Counter | make_counter (std::string const &prefix, std::string const &name) |
virtual Event | make_event (std::string const &name)=0 |
Create an event with the specified name. More... | |
Event | make_event (std::string const &prefix, std::string const &name) |
virtual Gauge | make_gauge (std::string const &name)=0 |
Create a gauge with the specified name. More... | |
Gauge | make_gauge (std::string const &prefix, std::string const &name) |
virtual Meter | make_meter (std::string const &name)=0 |
Create a meter with the specified name. More... | |
Meter | make_meter (std::string const &prefix, std::string const &name) |
Interface for a manager that allows collection of metrics.
To export metrics from a class, pass and save a shared_ptr to this interface in the class constructor. Create the metric objects as desired (counters, events, gauges, meters, and an optional hook) using the interface.
Definition at line 44 of file Collector.h.
Definition at line 47 of file Collector.h.
|
pure virtualdefault |
Hook beast::insight::Collector::make_hook | ( | Handler | handler | ) |
Create a hook.
A hook is called at each collection interval, on an implementation defined thread. This is a convenience facility for gathering metrics in the polling style. The typical usage is to update all the metrics of interest in the handler.
Handler will be called with this signature: void handler (void)
Definition at line 66 of file Collector.h.
|
pure virtual |
|
pure virtual |
Create a counter with the specified name.
Implemented in beast::insight::detail::StatsDCollectorImp, beast::insight::detail::GroupImp, and beast::insight::detail::NullCollectorImp.
Counter beast::insight::Collector::make_counter | ( | std::string const & | prefix, |
std::string const & | name | ||
) |
Definition at line 83 of file Collector.h.
|
pure virtual |
Create an event with the specified name.
Implemented in beast::insight::detail::StatsDCollectorImp, beast::insight::detail::GroupImp, and beast::insight::detail::NullCollectorImp.
Event beast::insight::Collector::make_event | ( | std::string const & | prefix, |
std::string const & | name | ||
) |
Definition at line 99 of file Collector.h.
|
pure virtual |
Create a gauge with the specified name.
Implemented in beast::insight::detail::StatsDCollectorImp, beast::insight::detail::GroupImp, and beast::insight::detail::NullCollectorImp.
Gauge beast::insight::Collector::make_gauge | ( | std::string const & | prefix, |
std::string const & | name | ||
) |
Definition at line 115 of file Collector.h.
|
pure virtual |
Create a meter with the specified name.
Implemented in beast::insight::detail::StatsDCollectorImp, beast::insight::detail::GroupImp, and beast::insight::detail::NullCollectorImp.
Meter beast::insight::Collector::make_meter | ( | std::string const & | prefix, |
std::string const & | name | ||
) |
Definition at line 131 of file Collector.h.