Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
core(tracehouse): allow nested trace events without an end #9785
core(tracehouse): allow nested trace events without an end #9785
Changes from 1 commit
84158fb
857d41b
e26d627
d20ffd9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
some of these seem like they won't affect anything, is it just general hygiene so they're all similar?
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.
they actually do have a noticeable effect though because if the
E
is the traceEnd then we fall into a different error recovery mode that turns these into valid events which is not what we want to testThere 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.
added a comment to this effect
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.
oh right, because then it would be assumed TaskB didn't have an end event (even though it did) and one was created for it (even though one wasn't), so then it would get trimmed to the length of TaskA.
Doesn't that seem like a problem with using
traceEndTs
as the signal we were missing an end event? It seems like this case (before theMarkerToPushOutTraceEnd
event is added) shouldn't be treated that way (even if it is very unlikely to occur).Are there downsides to using
Infinity
for thets
inlighthouse/lighthouse-core/lib/tracehouse/main-thread-tasks.js
Line 187 in 61f3ee4
?
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 disagree. In the case where we have just one of the E events and no other events following it at all, the most likely explanation to me is that it just got cutoff emitting the other
E
event for the exact same time, i.e. the exact case our workaround is targeting.The fact that other events follow it is what makes it a completely invalid situation.
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.
Hmm, I don't understand. In the case of
clearly there was an end event emitted...it seems better to check if other invalid heuristics apply than to just chop off TaskB at
baseTs + 100e3
.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.
Oh, oh sorry! Yeah this specific case sounds like it should work without it. 👍
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.
alright
Infinity
has it's own set of problems which is why I avoided it to begin with, so introduced anunbounded
boolean to deal with this. LMK if you think it's worth the tradeoff in the latest commitThere 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 figured there must be dragons in Infinity, but it was worth a look :)
unbounded
isn't the most elegant looking, but IMO it's worth it.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.
👍