Blame docs/src/metrics.rst
|
Packit Service |
e2ebee |
|
|
Packit Service |
e2ebee |
.. _metrics:
|
|
Packit Service |
e2ebee |
|
|
Packit Service |
e2ebee |
Metrics operations
|
|
Packit Service |
e2ebee |
======================
|
|
Packit Service |
e2ebee |
|
|
Packit Service |
e2ebee |
libuv provides a metrics API to track the amount of time the event loop has
|
|
Packit Service |
e2ebee |
spent idle in the kernel's event provider.
|
|
Packit Service |
e2ebee |
|
|
Packit Service |
e2ebee |
API
|
|
Packit Service |
e2ebee |
---
|
|
Packit Service |
e2ebee |
|
|
Packit Service |
e2ebee |
.. c:function:: uint64_t uv_metrics_idle_time(uv_loop_t* loop)
|
|
Packit Service |
e2ebee |
|
|
Packit Service |
e2ebee |
Retrieve the amount of time the event loop has been idle in the kernel's
|
|
Packit Service |
e2ebee |
event provider (e.g. ``epoll_wait``). The call is thread safe.
|
|
Packit Service |
e2ebee |
|
|
Packit Service |
e2ebee |
The return value is the accumulated time spent idle in the kernel's event
|
|
Packit Service |
e2ebee |
provider starting from when the :c:type:`uv_loop_t` was configured to
|
|
Packit Service |
e2ebee |
collect the idle time.
|
|
Packit Service |
e2ebee |
|
|
Packit Service |
e2ebee |
.. note::
|
|
Packit Service |
e2ebee |
The event loop will not begin accumulating the event provider's idle
|
|
Packit Service |
e2ebee |
time until calling :c:type:`uv_loop_configure` with
|
|
Packit Service |
e2ebee |
:c:type:`UV_METRICS_IDLE_TIME`.
|
|
Packit Service |
e2ebee |
|
|
Packit Service |
e2ebee |
.. versionadded:: 1.39.0
|