| 
    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 19 of file io_latency_probe.h.
      
  | 
  private | 
Definition at line 22 of file io_latency_probe.h.
      
  | 
  private | 
Definition at line 23 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 34 of file io_latency_probe.h.
| beast::io_latency_probe< Clock >::~io_latency_probe | ( | ) | 
Definition at line 43 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 52 of file io_latency_probe.h.
| boost::asio::io_context const & beast::io_latency_probe< Clock >::get_io_context | ( | ) | const | 
Definition at line 58 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 69 of file io_latency_probe.h.
| void beast::io_latency_probe< Clock >::cancel_async | ( | ) | 
Definition at line 76 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 89 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 106 of file io_latency_probe.h.
      
  | 
  private | 
Definition at line 119 of file io_latency_probe.h.
      
  | 
  private | 
Definition at line 132 of file io_latency_probe.h.
      
  | 
  private | 
Definition at line 139 of file io_latency_probe.h.
      
  | 
  private | 
Definition at line 25 of file io_latency_probe.h.
      
  | 
  private | 
Definition at line 26 of file io_latency_probe.h.
      
  | 
  private | 
Definition at line 27 of file io_latency_probe.h.
      
  | 
  private | 
Definition at line 28 of file io_latency_probe.h.
      
  | 
  private | 
Definition at line 29 of file io_latency_probe.h.
      
  | 
  private | 
Definition at line 30 of file io_latency_probe.h.
      
  | 
  private | 
Definition at line 31 of file io_latency_probe.h.