|
xrpld
|


Public Types | |
| using | Ptr = std::shared_ptr<Collector> |
Public Member Functions | |
| StatsDCollectorImp (ip::Endpoint address, std::string prefix, Journal journal) | |
| ~StatsDCollectorImp () override | |
| Hook | makeHook (HookImpl::HandlerType const &handler) override |
| Counter | makeCounter (std::string const &name) override |
| Create a counter with the specified name. | |
| Event | makeEvent (std::string const &name) override |
| Create an event with the specified name. | |
| Gauge | makeGauge (std::string const &name) override |
| Create a gauge with the specified name. | |
| Meter | makeMeter (std::string const &name) override |
| Create a meter with the specified name. | |
| void | add (StatsDMetricBase &metric) |
| void | remove (StatsDMetricBase &metric) |
| boost::asio::io_context & | getIoContext () |
| std::string const & | prefix () const |
| void | doPostBuffer (std::string const &buffer) |
| void | postBuffer (std::string &&buffer) |
| void | onSend (std::shared_ptr< std::deque< std::string > >, boost::system::error_code ec, std::size_t) |
| void | sendBuffers () |
| void | setTimer () |
| void | onTimer (boost::system::error_code ec) |
| void | run () |
| T | shared_from_this (T... args) |
| T | weak_from_this (T... args) |
| template<class Handler> | |
| Hook | makeHook (Handler handler) |
| Create a hook. | |
| Counter | makeCounter (std::string const &prefix, std::string const &name) |
| Event | makeEvent (std::string const &prefix, std::string const &name) |
| Gauge | makeGauge (std::string const &prefix, std::string const &name) |
| Meter | makeMeter (std::string const &prefix, std::string const &name) |
Static Public Member Functions | |
| static void | log (std::vector< boost::asio::const_buffer > const &buffers) |
| static std::shared_ptr< StatsDCollector > | make (ip::Endpoint const &address, std::string const &prefix, Journal journal) |
| Create a StatsD collector. | |
Static Private Member Functions | |
| static boost::asio::ip::udp::endpoint | toEndpoint (ip::Endpoint const &ep) |
Private Attributes | |
| Journal | journal_ |
| ip::Endpoint | address_ |
| std::string | prefix_ |
| boost::asio::io_context | ioContext_ |
| std::optional< boost::asio::executor_work_guard< boost::asio::io_context::executor_type > > | work_ |
| boost::asio::strand< boost::asio::io_context::executor_type > | strand_ |
| boost::asio::basic_waitable_timer< std::chrono::steady_clock > | timer_ |
| boost::asio::ip::udp::socket | socket_ |
| std::deque< std::string > | data_ |
| std::recursive_mutex | metricsLock_ |
| List< StatsDMetricBase > | metrics_ |
| std::thread | thread_ |
Static Private Attributes | |
| static constexpr auto | kMaxPacketSize = 1472 |
Definition at line 203 of file StatsDCollector.cpp.
|
inherited |
Definition at line 29 of file Collector.h.
| beast::insight::detail::StatsDCollectorImp::StatsDCollectorImp | ( | ip::Endpoint | address, |
| std::string | prefix, | ||
| Journal | journal ) |
Definition at line 231 of file StatsDCollector.cpp.
|
override |
Definition at line 243 of file StatsDCollector.cpp.
|
staticprivate |
Definition at line 225 of file StatsDCollector.cpp.
|
overridevirtual |
Implements beast::insight::Collector.
Definition at line 259 of file StatsDCollector.cpp.
|
overridevirtual |
Create a counter with the specified name.
Implements beast::insight::Collector.
Definition at line 265 of file StatsDCollector.cpp.
|
overridevirtual |
Create an event with the specified name.
Implements beast::insight::Collector.
Definition at line 271 of file StatsDCollector.cpp.
|
overridevirtual |
Create a gauge with the specified name.
Implements beast::insight::Collector.
Definition at line 277 of file StatsDCollector.cpp.
|
overridevirtual |
Create a meter with the specified name.
Implements beast::insight::Collector.
Definition at line 283 of file StatsDCollector.cpp.
| void beast::insight::detail::StatsDCollectorImp::add | ( | StatsDMetricBase & | metric | ) |
Definition at line 291 of file StatsDCollector.cpp.
| void beast::insight::detail::StatsDCollectorImp::remove | ( | StatsDMetricBase & | metric | ) |
Definition at line 298 of file StatsDCollector.cpp.
| boost::asio::io_context & beast::insight::detail::StatsDCollectorImp::getIoContext | ( | ) |
Definition at line 307 of file StatsDCollector.cpp.
| std::string const & beast::insight::detail::StatsDCollectorImp::prefix | ( | ) | const |
Definition at line 313 of file StatsDCollector.cpp.
| void beast::insight::detail::StatsDCollectorImp::doPostBuffer | ( | std::string const & | buffer | ) |
Definition at line 319 of file StatsDCollector.cpp.
| void beast::insight::detail::StatsDCollectorImp::postBuffer | ( | std::string && | buffer | ) |
Definition at line 325 of file StatsDCollector.cpp.
| void beast::insight::detail::StatsDCollectorImp::onSend | ( | std::shared_ptr< std::deque< std::string > > | , |
| boost::system::error_code | ec, | ||
| std::size_t | ) |
Definition at line 336 of file StatsDCollector.cpp.
|
static |
Definition at line 353 of file StatsDCollector.cpp.
| void beast::insight::detail::StatsDCollectorImp::sendBuffers | ( | ) |
Definition at line 368 of file StatsDCollector.cpp.
| void beast::insight::detail::StatsDCollectorImp::setTimer | ( | ) |
Definition at line 420 of file StatsDCollector.cpp.
| void beast::insight::detail::StatsDCollectorImp::onTimer | ( | boost::system::error_code | ec | ) |
Definition at line 428 of file StatsDCollector.cpp.
| void beast::insight::detail::StatsDCollectorImp::run | ( | ) |
Definition at line 451 of file StatsDCollector.cpp.
|
staticinherited |
Create a StatsD collector.
| address | The IP address and port of the StatsD server. |
| prefix | A string pre-pended before each metric name. |
| journal | Destination for logging output. |
Definition at line 710 of file StatsDCollector.cpp.
|
inherited |
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 49 of file Collector.h.
|
inherited |
Definition at line 67 of file Collector.h.
|
inherited |
Definition at line 84 of file Collector.h.
|
inherited |
Definition at line 101 of file Collector.h.
|
inherited |
Definition at line 118 of file Collector.h.
|
staticconstexprprivate |
Definition at line 207 of file StatsDCollector.cpp.
|
private |
Definition at line 209 of file StatsDCollector.cpp.
|
private |
Definition at line 210 of file StatsDCollector.cpp.
|
private |
Definition at line 211 of file StatsDCollector.cpp.
|
private |
Definition at line 212 of file StatsDCollector.cpp.
|
private |
Definition at line 213 of file StatsDCollector.cpp.
|
private |
Definition at line 214 of file StatsDCollector.cpp.
|
private |
Definition at line 215 of file StatsDCollector.cpp.
|
private |
Definition at line 216 of file StatsDCollector.cpp.
|
private |
Definition at line 217 of file StatsDCollector.cpp.
|
private |
Definition at line 218 of file StatsDCollector.cpp.
|
private |
Definition at line 219 of file StatsDCollector.cpp.
|
private |
Definition at line 222 of file StatsDCollector.cpp.