-
Notifications
You must be signed in to change notification settings - Fork 29.4k
[timeline] Sort timeline events before summarizing #55763
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
[timeline] Sort timeline events before summarizing #55763
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
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, I'll be curious to see what impact this has on our benchmark dashboard.
.toList(); | ||
|
||
timelineEvents.sort((TimelineEvent e1, TimelineEvent e2) { | ||
return e1.timestampMicros.compareTo(e2.timestampMicros); |
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.
I just tried running this on my favorite benchmark and got a null exception here. Apparently not all events have timestamps and so you need to do something special to compare events with null timestamps (null should be sorted as less than everything else, maybe?)
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.
It looks like all of the events in the timeline I was processing that had null timestamps were the "thread_name" events at the beginning of the log.
reverted at #55769, will make |
Sorry about the premature approval. :( |
No description provided.