Uh oh!
There was an error while loading. Please reload this page.
[v12.x backport] worker: add eventLoopUtilization() - #37165
Conversation
5bbaeb0 to
542c56fComparenodejs-github-bot
commented
Feb 1, 2021
nodejs-github-bot
commented
Feb 1, 2021
richardlau
commented
Feb 1, 2021
Does this include #35891? |
juanarbol
commented
Feb 1, 2021
Nope, let me work on that for both backport PRs |
juanarbol
commented
Feb 1, 2021
@richardlau should I squash #35891 with #35664 ? or basically follow the steps described in the backporting guide (here) for both commits ? |
juanarbol
commented
Feb 1, 2021
The |
nodejs-github-bot
commented
Feb 1, 2021
97183ae to
4ac8f37Compare344f7ff to
e132479Comparejuanarbol
commented
Feb 22, 2021
@richardlau is there anything missing here? |
0692611 to
6cef0e3Compare
This comment has been minimized.
This comment has been minimized.
richardlau
commented
Mar 2, 2021
@juanarbol Could you rebase this onto the current v12.x-staging please? |
e132479 to
77ef942Compare77ef942 to
2e3251eComparejuanarbol
commented
Mar 2, 2021
@richardlau Rebased! |
This comment has been minimized.
This comment has been minimized.
nodejs-github-bot
commented
Mar 2, 2021
nodejs-github-bot
commented
Mar 7, 2021
richardlau
commented
Mar 8, 2021
@juanarbol |
2e3251e to
e663156Comparee663156 to
280d3c2Comparenodejs-github-bot
commented
Mar 9, 2021
juanarbol
commented
Mar 9, 2021
@richardlau, your review is addressed :) I think this is ready to be landed. |
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: nodejs#35664
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Backport-PR-URL: nodejs#37165The active worker check compared the time from sending message till response arrived from worker with the complete time the worker was running till it responses to the spin request. If sending back the message is slow for some reason the test fails. Adapt the test to compare the time seen inside the worker with the time read from main thread. PR-URL: nodejs#35891Fixes: nodejs#35844 Refs: nodejs#35886 Refs: nodejs#35664 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Backport-PR-URL: nodejs#37165
280d3c2 to
d7a4ccdComparerichardlau
commented
Mar 16, 2021
Landed in 0f6d445...d7a4ccd |
Refs: #35664
Allow calling eventLoopUtilization() directly on a worker thread:
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: #35664
Reviewed-By: Juan José Arboleda soyjuanarbol@gmail.com
Reviewed-By: Anna Henningsen anna@addaleax.net
Reviewed-By: Gerhard Stöbich deb2001-github@yahoo.de
Reviewed-By: James M Snell jasnell@gmail.com