8000
Skip to content

core(mpfid): add list of loaf durations to debugdata - #15685

Merged
devtools-bot merged 3 commits into
mainfrom
loafs-plural
Dec 11, 2023
Merged

core(mpfid): add list of loaf durations to debugdata#15685
devtools-bot merged 3 commits into
mainfrom
loafs-plural

Conversation

@brendankenny
@brendankenny brendankenny commented Dec 11, 2023
Copy link
Copy Markdown
Contributor

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.

@brendankenny
brendankenny requested a review from a team as a code owner December 11, 2023 22:17
@brendankenny
brendankenny requested review from connorjclark and removed request for a team December 11, 2023 22:17
@@ -92,6 +108,7 @@ class MaxPotentialFID extends Audit {
type: 'debugdata',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Good catch

const loafEvents = processedTrace.mainThreadEvents.filter(evt => {
return evt.name === 'LongAnimationFrame' & 8000 amp;& evt.ph === 'b';
});
if (loafEvents.length === 0) return;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This case won't really hurt anything without this check, so is mostly for aesthetics (prevent empty {type: 'debugdata', observedLoafs: []} hanging around in LHRs)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

0