Thanks! We already have a similar metric. The problem is that measured latency grows only after io_context becomes overloaded: when the queue grows because all threads are busy.

I would like to measure io_context load before it became overloaded to estimate capacity.

Thanks,
Dmitry

On Fri, Jun 30, 2023 at 17:00, Vinnie Falco via Boost-users <boost-users@lists.boost.org>:
On Fri, Jun 30, 2023 at 6:58 AM Dmitry via Boost-users
<boost-users@lists.boost.org> wrote:
> I would like to have a metric that measures time spent for
> work (executing completion handlers) vs time spent waiting
> for work in thread pool executing io_context::run().

Maybe there are some ideas here?

https://github.com/XRPLF/rippled/blob/f18c6dfea7870132490124e1942901a6a0cddc7e/src/ripple/beast/asio/io_latency_probe.h#L34

Thanks
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
https://lists.boost.org/mailman/listinfo.cgi/boost-users