-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
report: print common items first for readability #27367
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update the timer
example in the docs too? Otherwise LGTM.
I am not sure which part. Can you post a link or snippet ? Thanks. |
GitHub makes it hard to link to snippets in markdown docs but the |
I see. I will try to fix it after I watched |
a21e361
to
78cfd6f
Compare
@richardlau Fixed. |
Hmm... are there no tests that are verifying the actual output here? I know there's quite a bit that's non-deterministic but there should at least be some validation in the test. Changing the order of these these should break at least something in the tests :-) |
We have a test that verifies the libuv handle information ( |
Hmm... ok, I think that's definitely something we can improve. A basic message type test that checks the unparsed output would be worthwhile |
Is there any example I can reference for output key sort ? |
Now we have nested structure like this, looks like more hard to match 😭
|
Will try something like this in test-report-uv-handles {
const get_libuv = /"libuv":\s\[([\s\S]*?)\]/gm;
const get_handle_inner = /{([\s\S]*?),*?}/gm;
const libuv_handles_str = get_libuv.exec(stdout)[1];
const libuv_handles_array = libuv_handles_str.match(get_handle_inner);
libuv_handles_array.map(i => {
// exclude nested structure
if (i.includes('type')) {
const handle_keys = i.match(/(".*"):/gm);
assert(handle_keys[0], 'type');
assert(handle_keys[1], 'is_active');
}
});
} |
d6bef39
to
005d602
Compare
Not know why this test keep failed on my win10, so just let's travis run the tests ... Debugger attached.
assert.js:87
throw new AssertionError(obj);
^
AssertionError [ERR_ASSERTION]: Process exited unexpectedly with code1
at ChildProcess.<anonymous> (D:\Developer\node\test\report\test-report-uv-handles.js:88:12)
at ChildProcess.<anonymous> (D:\Developer\node\test\common\index.js:373:15)
at ChildProcess.emit (events.js:194:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
Waiting for the debugger to disconnect.. |
005d602
to
c0228e4
Compare
@richardlau @jasnell I add related test and CI is green, can you review this again ? thanks. |
Landed in 38f3526 |
PR-URL: #27367 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]>
PR-URL: #27367 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]>
cc @richardlau
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes