Skip to content

Conversation

legendecas
Copy link
Member

@legendecas legendecas commented Feb 9, 2023

Although the performance.timeOrigin is a Web API, Node.js specific extension performance.nodeTiming exposes the process performance milestones in the main thread and the worker threads. In order to avoid exposing negative values in performance.nodeTiming, set the performance.timeOrigin to the start time of the process both in the main thread and worker threads.

Refs: #43781
Fixes #45958, with regression test cases.

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Feb 9, 2023
@legendecas
Copy link
Member Author

#43781 didn't land on v14.x and v16.x, so this fix doesn't need to land on v14.x and v16.x too.

@legendecas legendecas force-pushed the perf_hooks/time_origin branch from b318df3 to 6760c9a Compare February 16, 2023 16:55
@legendecas legendecas added the request-ci Add this label to start a Jenkins CI on a PR. label Feb 20, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 20, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@legendecas legendecas added the request-ci Add this label to start a Jenkins CI on a PR. label Feb 27, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 27, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@legendecas
Copy link
Member Author

Fixed the test failure with tools/run-worker.js.

legendecas added a commit that referenced this pull request Mar 2, 2023
PR-URL: #46588
Fixes: #45958
Refs: #43781
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
@legendecas
Copy link
Member Author

Landed in a8c3d03

@legendecas legendecas closed this Mar 2, 2023
@legendecas legendecas deleted the perf_hooks/time_origin branch March 2, 2023 16:22
targos pushed a commit that referenced this pull request Mar 13, 2023
PR-URL: #46588
Fixes: #45958
Refs: #43781
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
targos pushed a commit that referenced this pull request Mar 14, 2023
PR-URL: #46588
Fixes: #45958
Refs: #43781
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
@danielleadams
Copy link
Contributor

@legendecas this didn't land cleanly on v18.x - do you mind opening a backport PR? Thank you

@legendecas
Copy link
Member Author

#43781 didn't land on v18.x. I'm tagging this as https://github.com/nodejs/node/labels/dont-land-on-v18.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PerformanceNodeTiming of perf_hooks

6 participants