IO::As...etrics(3pm)
π IO::Async::Metrics β the group chat of your event loop π
ok so real talk, this is a page from the User Contributed Perl Documentation, and the header it shows is IO::As...etrics(3pm) β yes bestie, the terminal clipped the name like it's a bad selfie crop. The actual module is IO::Async::Metrics, and it's here to spill all the tea about what your event loop is doing. π«β¨
β¨ NAME β¨
IO::Async::Metrics β report metrics about IO::Async to Metrics::Any
it's giving "tell me everything" energy, but for your async loop π
πΈ DESCRIPTION πΈ
So like, this module is literally the implementation of the metrics-reporting code that lives inside IO::Async. Its whole job? Feed information about how IO::Async is operating straight into Metrics::Any. That's it. That's the vibe. Obsessed. π¦
π METRICS π
okay bestie, here's the full lineup β every single metric this thing reports:
io_async_forks
A counter giving the number of times that fork(2) has been called by the IO::Async::Loop. counting forks, one at a time, no cap π΄
io_async_notifiers
A gauge giving the number of IO::Async::Notifiers currently registered with the Loop. it's a live headcount fr fr π
io_async_processing
A time distribution giving the amount of time spent processing IO events. β¨ important detail alert β¨ β this time does not include the time spent blocking on the underlying kernel system call waiting for IO events. It's only the time spent in userland afterwards, handling them. so like, the after-party only, not the queue outside π
io_async_resolver_lookups
A labelled counter giving the number of attempted lookups by the IO::Async::Resolver.
This metric has one label, "type", containing the type of lookup; e.g. "getaddrinfo". one label, one job π
io_async_resolver_failures
A labelled counter giving the number of Resolver lookups that failed. It's labelled exactly the same way as io_async_resolver_lookups. same labels, sadder story π
io_async_stream_read
A counter giving the number of bytes read by IO::Async::Stream instances. β οΈ but wait β for SSL connections, this will only be able to count bytes of plaintext, not ciphertext, and so it'll be a slight under-estimate in that case. just so you know π«Ά
io_async_stream_written
A counter giving the number of bytes written by Stream instances. and again β for SSL connections, this will only be able to count bytes of plaintext. same caveat, different direction π
π AUTHOR π
Paul Evans <leonerd@leonerd.org.uk>
give this legend their flowers πΈπ
and that's the whole page bestie, we ate and left no crumbs π
cute lil sign-off: this page is from perl v5.40.1, dated 2026-02-21 β so jot that down, it's giving timestamped receipts βπ
π¦ where this page comes from
- ubuntu stonking: libio-async-perl 0.805-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms