-
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
src: TraceEventScope should mark sync duration events #42977
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
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.
LGTM apart from one tiny optional nitpick.
Not sure if this is the correct fix. They were implemented the way they were so that we can trace how long these various methods take to complete so we can better determine if changes introduce performance regressions. That said, they likely aren't broadly used and everything under trace events is still considered experimental and therefore breaking changes are ok. |
The duration events do contain the timestamps on which we can trace how long these methods take to complete, as same as async events. However, synchronous duration events also suggest that these methods are performed in one single thread for a period of time, while async events are not and can be performed intermittently. @jasnell I'm not sure what you mean by "correct fix". Do you suggest that the methods changed in this PR can be performed in different threads for a given unique id or intermittently? |
@jasnell would you mind elaborating your suggestion here? This PR has opened for 7 days but I'd still like to know your opinions before landing. Thank you. |
Landed in 7035186 |
According to the chrome trace event format document, works that are performed on one single thread should be traced with sync duration events. In this way, these events can be grouped under one thread and the trace event viewer can estimate the CPU usage of that thread. PR-URL: #42977 Reviewed-By: Darshan Sen <raisinten@gmail.com>
According to the chrome trace event format document, works that are performed on one single thread should be traced with sync duration events. In this way, these events can be grouped under one thread and the trace event viewer can estimate the CPU usage of that thread. PR-URL: #42977 Reviewed-By: Darshan Sen <raisinten@gmail.com>
According to the chrome trace event format document, works that are performed on one single thread should be traced with sync duration events. In this way, these events can be grouped under one thread and the trace event viewer can estimate the CPU usage of that thread. PR-URL: #42977 Reviewed-By: Darshan Sen <raisinten@gmail.com>
According to the chrome trace event format document, works that are performed on one single thread should be traced with sync duration events. In this way, these events can be grouped under one thread and the trace event viewer can estimate the CPU usage of that thread. PR-URL: #42977 Reviewed-By: Darshan Sen <raisinten@gmail.com>
According to the chrome trace event format document, works that are performed on one single thread should be traced with sync duration events. In this way, these events can be grouped under one thread and the trace event viewer can estimate the CPU usage of that thread. PR-URL: #42977 Reviewed-By: Darshan Sen <raisinten@gmail.com>
According to the chrome trace event format document, works that are performed on one single thread should be traced with sync duration events. In this way, these events can be grouped under one thread and the trace event viewer can estimate the CPU usage of that thread. PR-URL: #42977 Reviewed-By: Darshan Sen <raisinten@gmail.com>
According to the chrome trace event format document, works that are performed on one single thread should be traced with sync duration events. In this way, these events can be grouped under one thread and the trace event viewer can estimate the CPU usage of that thread. PR-URL: nodejs/node#42977 Reviewed-By: Darshan Sen <raisinten@gmail.com>
According to the chrome trace event format document, works that are performed on one single thread should be traced with sync duration events. In this way, these events can be grouped under one thread and the trace event viewer can estimate the CPU usage of that thread.
click to see screen shots
Before:
Note that there are no events recorded in the JavaScriptMainThread nor WorkerThread 1.
After:
Environment events like cleanup are correctly grouped under their thread.