|
rippled
|
Measures handler latency on an io_context queue. More...
#include <io_latency_probe.h>

Classes | |
| struct | sample_op |
Public Member Functions | |
| io_latency_probe (duration const &period, boost::asio::io_context &ios) | |
| ~io_latency_probe () | |
| template<class Handler > | |
| void | sample_one (Handler &&handler) |
| Measure one sample of i/o latency. | |
| template<class Handler > | |
| void | sample (Handler &&handler) |
| Initiate continuous i/o latency sampling. | |
| boost::asio::io_context & | get_io_context () |
| Return the io_context associated with the latency probe. | |
| boost::asio::io_context const & | get_io_context () const |
| void | cancel () |
| Cancel all pending i/o. | |
| void | cancel_async () |
Private Types | |
| using | duration = typename Clock::duration |
| using | time_point = typename Clock::time_point |
Private Member Functions | |
| void | cancel (std::unique_lock< decltype(m_mutex)> &lock, bool wait) |
| void | addref () |
| void | release () |
Private Attributes | |
| std::recursive_mutex | m_mutex |
| std::condition_variable_any | m_cond |
| std::size_t | m_count |
| duration const | m_period |
| boost::asio::io_context & | m_ios |
| boost::asio::basic_waitable_timer< std::chrono::steady_clock > | m_timer |
| bool | m_cancel |
Measures handler latency on an io_context queue.
Definition at line 38 of file io_latency_probe.h.
|
private |
Definition at line 41 of file io_latency_probe.h.
|
private |
Definition at line 42 of file io_latency_probe.h.
| beast::io_latency_probe< Clock >::io_latency_probe | ( | duration const & | period, |
| boost::asio::io_context & | ios | ||
| ) |
Definition at line 53 of file io_latency_probe.h.
| beast::io_latency_probe< Clock >::~io_latency_probe | ( | ) |
Definition at line 62 of file io_latency_probe.h.
| boost::asio::io_context & beast::io_latency_probe< Clock >::get_io_context | ( | ) |
Return the io_context associated with the latency probe.
Definition at line 71 of file io_latency_probe.h.
| boost::asio::io_context const & beast::io_latency_probe< Clock >::get_io_context | ( | ) | const |
Definition at line 77 of file io_latency_probe.h.
| void beast::io_latency_probe< Clock >::cancel | ( | ) |
Cancel all pending i/o.
Any handlers which have already been queued will still be called.
Definition at line 88 of file io_latency_probe.h.
| void beast::io_latency_probe< Clock >::cancel_async | ( | ) |
Definition at line 95 of file io_latency_probe.h.
| void beast::io_latency_probe< Clock >::sample_one | ( | Handler && | handler | ) |
Measure one sample of i/o latency.
Handler will be called with this signature: void Handler (Duration d);
Definition at line 108 of file io_latency_probe.h.
| void beast::io_latency_probe< Clock >::sample | ( | Handler && | handler | ) |
Initiate continuous i/o latency sampling.
Handler will be called with this signature: void Handler (std::chrono::milliseconds);
Definition at line 125 of file io_latency_probe.h.
|
private |
Definition at line 138 of file io_latency_probe.h.
|
private |
Definition at line 151 of file io_latency_probe.h.
|
private |
Definition at line 158 of file io_latency_probe.h.
|
private |
Definition at line 44 of file io_latency_probe.h.
|
private |
Definition at line 45 of file io_latency_probe.h.
|
private |
Definition at line 46 of file io_latency_probe.h.
|
private |
Definition at line 47 of file io_latency_probe.h.
|
private |
Definition at line 48 of file io_latency_probe.h.
|
private |
Definition at line 49 of file io_latency_probe.h.
|
private |
Definition at line 50 of file io_latency_probe.h.