src: add loop idle time in diagnostic report#35940
src: add loop idle time in diagnostic report#35940gireeshpunathil merged 1 commit intonodejs:masterfrom
Conversation
Is this structural change (as opposed to just a new field) the sort of thing that should bump |
|
@richardlau - it is a new field addition, but that led to a structural change too. Original structure
|
|
I think the report version should be bumped. Can you also update the example report in the documentation. |
|
all - I have bumped the report version to 3, and reflected the change in the doc too. PTAL! |
|
Why do we not add this to the |
|
@addaleax - to confirm my understanding, are you proposing this style? "libuv": [
{
"type": "async",
"is_active": true,
"is_referenced": false,
"address": "0x0000000105a0bd70"
},
{
"loop_idle_time": 22644.8
}
] |
|
or I guess here, as an additional key-value pair: {
"type": "loop",
"is_active": true,
"address": "0x000055fc7b2cb180",
"loop_idle_time": 22644.8
}? |
|
@gireeshpunathil Yes, the latter, for the |
78238da to
516ec3d
Compare
|
@addaleax - done, ptal! |
There was a problem hiding this comment.
LGTM.
Maybe also add a validator for loop to the uv handles test to assert the new field is present and a number?
node/test/report/test-report-uv-handles.js
Lines 119 to 171 in 9dbde1d
Trott
left a comment
There was a problem hiding this comment.
LGTM but I think doc/api/report.md still needs the relevant example updated to include this? (and the missing semicolon added to the test per linter)
|
I'm just curious. Why add it as |
|
@trevnorris What would you suggest instead? Seconds were suggested by me because they match other existing fields in the diagnostic output, so we’re being a bit consistent here instead of using random units everywhere. |
|
@addaleax That's fine. I just noticed the field |
This comment has been minimized.
This comment has been minimized.
|
@richardlau @cjihrig @addaleax @Trott - PTAL! |
cjihrig
left a comment
There was a problem hiding this comment.
LGTM with one small question.
src/node_report.cc
Outdated
There was a problem hiding this comment.
Is idle_time in nanoseconds? I thought @trevnorris said it was milliseconds in #35940 (comment).
There was a problem hiding this comment.
The libuv code uses uv_hrtime() without any additional scaling, so, yes, nanoseconds.
There was a problem hiding this comment.
Lines 446 to 447 in 589b2a1
this may make it very clear - the nanoseconds that comes is converted to millis if accessed through API.
There was a problem hiding this comment.
That makes sense. I was just confused by #35940 (comment). Thanks Anna and Gireesh.
|
https://ci.nodejs.org/job/node-test-binary-arm-12+/RUN_SUBSET=3,label=pi3-docker/8251/console the failure in |
Add libuv's cumulative idle time in the diagnostic report. Add the data under the libuv's loop section Refs: nodejs#34938 PR-URL: nodejs#35940 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Richard Lau <[email protected]>
b5ee125 to
74bd866
Compare
|
landed in 74bd866 |
Add libuv's cumulative idle time in the diagnostic report. Add the data under the libuv's loop section Refs: #34938 PR-URL: #35940 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Richard Lau <[email protected]>
Notable changes: dns: * (SEMVER-MINOR) add a cancel() method to the promise Resolver (Szymon Marczak) #33099 events: * (SEMVER-MINOR) add max listener warning for EventTarget (James M Snell) #36001 http: * (SEMVER-MINOR) add support for abortsignal to http.request (Benjamin Gruenbaum) #36048 http2: * (SEMVER-MINOR) allow setting the local window size of a session (Yongsheng Zhang) #35978 lib: * (SEMVER-MINOR) add throws option to fs.f/l/statSync (Andrew Casey) #33716 path: * (SEMVER-MINOR) add `path/posix` and `path/win32` alias modules (ExE Boss) #34962 readline: * (SEMVER-MINOR) add getPrompt to get the current prompt (Mattias Runge-Broberg) #33675 src: * (SEMVER-MINOR) add loop idle time in diagnostic report (Gireesh Punathil) #35940 util: * (SEMVER-MINOR) add `util/types` alias module (ExE Boss) #34055 PR-URL: TODO
Notable changes: dns: * (SEMVER-MINOR) add a cancel() method to the promise Resolver (Szymon Marczak) #33099 events: * (SEMVER-MINOR) add max listener warning for EventTarget (James M Snell) #36001 http: * (SEMVER-MINOR) add support for abortsignal to http.request (Benjamin Gruenbaum) #36048 http2: * (SEMVER-MINOR) allow setting the local window size of a session (Yongsheng Zhang) #35978 lib: * (SEMVER-MINOR) add throws option to fs.f/l/statSync (Andrew Casey) #33716 path: * (SEMVER-MINOR) add `path/posix` and `path/win32` alias modules (ExE Boss) #34962 readline: * (SEMVER-MINOR) add getPrompt to get the current prompt (Mattias Runge-Broberg) #33675 src: * (SEMVER-MINOR) add loop idle time in diagnostic report (Gireesh Punathil) #35940 util: * (SEMVER-MINOR) add `util/types` alias module (ExE Boss) #34055 PR-URL: TODO
Notable changes: dns: * (SEMVER-MINOR) add a cancel() method to the promise Resolver (Szymon Marczak) #33099 events: * (SEMVER-MINOR) add max listener warning for EventTarget (James M Snell) #36001 http: * (SEMVER-MINOR) add support for abortsignal to http.request (Benjamin Gruenbaum) #36048 http2: * (SEMVER-MINOR) allow setting the local window size of a session (Yongsheng Zhang) #35978 lib: * (SEMVER-MINOR) add throws option to fs.f/l/statSync (Andrew Casey) #33716 path: * (SEMVER-MINOR) add `path/posix` and `path/win32` alias modules (ExE Boss) #34962 readline: * (SEMVER-MINOR) add getPrompt to get the current prompt (Mattias Runge-Broberg) #33675 src: * (SEMVER-MINOR) add loop idle time in diagnostic report (Gireesh Punathil) #35940 util: * (SEMVER-MINOR) add `util/types` alias module (ExE Boss) #34055 PR-URL: #36232
Notable changes: dns: * (SEMVER-MINOR) add a cancel() method to the promise Resolver (Szymon Marczak) #33099 events: * (SEMVER-MINOR) add max listener warning for EventTarget (James M Snell) #36001 http: * (SEMVER-MINOR) add support for abortsignal to http.request (Benjamin Gruenbaum) #36048 http2: * (SEMVER-MINOR) allow setting the local window size of a session (Yongsheng Zhang) #35978 lib: * (SEMVER-MINOR) add throws option to fs.f/l/statSync (Andrew Casey) #33716 path: * (SEMVER-MINOR) add `path/posix` and `path/win32` alias modules (ExE Boss) #34962 readline: * (SEMVER-MINOR) add getPrompt to get the current prompt (Mattias Runge-Broberg) #33675 src: * (SEMVER-MINOR) add loop idle time in diagnostic report (Gireesh Punathil) #35940 util: * (SEMVER-MINOR) add `util/types` alias module (ExE Boss) #34055 PR-URL: #36232
Add libuv's cumulative idle time in the diagnostic report. Add the data under the libuv's loop section Refs: #34938 PR-URL: #35940 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Richard Lau <[email protected]>
Add libuv's cumulative idle time in the diagnostic report. Add the data under the libuv's loop section Refs: #34938 PR-URL: #35940 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Richard Lau <[email protected]>
Add libuv's cumulative idle time in the diagnostic report.
Modify the structure of libuv section to cater to this change
Refs: #34938
before
after
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes