You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Usually, when extracting the ELU from a specific JS thread is better to
do it from a different thread as the event loop we're observing might
already be blocked. The `Worker.performance.eventLoopUtilization()`
method allows us to do this for worker threads, but there's not a way
to do this for the main thread. This new API, which allows us to
retrieve the ELU of the parent thread from a specific worker, is going
to enable this.
For the moment, I have defined this new API in
```
require('worker_threads').parent.performance.eventLoopUtilization()
```
though I haven't added documentation yet as
a) I want to know first whether this approach is acceptable, and in case
it is,
b) I'm not really sure whether that's the place the API should live in.
Would love receiving feedback on this.
0 commit comments