core(mpfid): add list of loaf durations to debugdata - #15685
Merged
Conversation
brendankenny
requested review from
connorjclark
and removed request for
a team
December 11, 2023 22:17
adamraine
reviewed
Dec 11, 2023
| @@ -92,6 +108,7 @@ class MaxPotentialFID extends Audit { | |||
| type: 'debugdata', | |||
Contributor
There was a problem hiding this comment.
We won't see the observedLoafs if they were all below FCP in this case. The function will still return undefined because there is no max duration/blocking events after FCP.
Contributor
Author
There was a problem hiding this comment.
Thanks! Good catch
adamraine
approved these changes
Dec 11, 2023
brendankenny
commented
Dec 11, 2023
| const loafEvents = processedTrace.mainThreadEvents.filter(evt => { | ||
| return evt.name === 'LongAnimationFrame' & 8000 amp;& evt.ph === 'b'; | ||
| }); | ||
| if (loafEvents.length === 0) return; |
Contributor
Author
There was a problem hiding this comment.
This case won't really hurt anything without this check, so is mostly for aesthetics (prevent empty {type: 'debugdata', observedLoafs: []} hanging around in LHRs)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Building on #15684, also logs LoAF startTime/durations in mpfid debugdata to be able to evaluate if a windowed function over LoAFs (e.g. max sum of LoAF blockingDurations in a 5s window) would be useful.
No visible changes. Again the intended purpose is analysis via a source like HTTP Archive.
I also didn't realize how "minimal" "Tests are minimal" was in #15684 because I forgot to add the unit test file to the commit. Whoops! Added in this PR.