Commit 04d16646 authored by Trevor Norris's avatar Trevor Norris Committed by Gerhard Stoebich
Browse files

worker: add eventLoopUtilization()

Allow calling eventLoopUtilization() directly on a worker thread:

    const worker = new Worker('./foo.js');
    const elu = worker.performance.eventLoopUtilization();
    setTimeout(() => {
      worker.performance.eventLoopUtilization(elu);
    }, 10);

Add a new performance object on the Worker instance that will hopefully
one day hold all the other performance metrics, such as nodeTiming.

Include benchmarks and tests.

PR-URL: https://github.com/nodejs/node/pull/35664


Reviewed-By: default avatarJuan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarGerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 0d474327
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment