> I don't think there is a need to build in "lag" calculation, libuv
users can track that themselves by combining a uv_prepare_t and
uv_check_t handle.

Sorry, I didn't mean to propose it as an addition to libuv. I am interested
in whether or not you would say that this metric makes sense. A lot of
factors can influence this "lag" and I find it hard to decide which values
are good or bad.

> You probably want to track HandleWrap instances through
process._getActiveHandles(), those correspond more closely to what is
visible to JS.

Thanks Ben, I'll check it out!

On Sun, Jan 3, 2016 at 10:49 PM Ben Noordhuis <[email protected]> wrote:

> On Fri, Jan 1, 2016 at 9:10 AM, Ben Ripkens <[email protected]> wrote:
> > Hi,
> >
> > I'd like to know how you determine whether the event loop is "healthy" or
> > "unhealthy", e.g. hitting capacity limits, queue size growing. Do you use
> > any metrics or statistics? Does libuv expose any metrics for these
> purposes?
> > Come to think of it: Queue size sounds interesting to me…
> >
> > I have seen people determine an "event loop lag" which can roughly be
> > summarized as:
> >
> > lag = abs(expected time of execution - actual time of execution)
> >
> > Would you consider this useful?
> >
> > Thanks
> >
> > Ben
>
> I don't think there is a need to build in "lag" calculation, libuv
> users can track that themselves by combining a uv_prepare_t and
> uv_check_t handle.
>
> Libuv currently tracks the number of active handles but not the number
> of active requests (except through an O(n) operation).  I know you are
> asking in the context of node.js monitoring; quite a few handles in
> node.js are not exposed to JS land so the current handle count is of
> questionable use, IMO.
>
> You probably want to track HandleWrap instances through
> process._getActiveHandles(), those correspond more closely to what is
> visible to JS.
>
> --
> You received this message because you are subscribed to the Google Groups
> "libuv" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/libuv.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.

Reply via email to