-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Track new front-end metric: LCP-TTFB #48288
Conversation
Median is stable enough, we can stick to it.
bin/plugin/commands/performance.js
Outdated
largestContentfulPaintP75: percentile75( | ||
results.largestContentfulPaint | ||
), | ||
timeToFirstByte, |
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.
This is the gist, the rest are docs changes:
- rename
timeToFirstByteMedian
totimeToFirstByte
- remove
timeToFirstByteP75
- rename
largestContentfulPaintMedian
tolargestContentfulPaint
- remove
largestContentfulPaintP75
- add
lcMinusTtfb
I presume this is going to need to codevitals.run
config changes to gather the existing metrics we report for the updated fields. If renaming is problematic for codevitals, I can revert that and leave the *Median
fields while still removing the *P75
ones.
Can we also should the new one lcpMinetTtfb
as LCP - TTFB (classic or block)
, @youknowriad ?
Size Change: +295 B (0%) Total Size: 1.33 MB
ℹ️ View Unchanged
|
Flaky tests detected in 9309f15. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4241199921
|
bin/plugin/commands/performance.js
Outdated
), | ||
timeToFirstByte, | ||
largestContentfulPaint, | ||
lcpMinusTtfb: largestContentfulPaint - timeToFirstByte, |
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 see this is only computed here, meaning it won't be part of the logged results when you run the tests manually using npm run test:performance ...
should we make the computation in the spec files directly instead and add a log to the performance logger as well?
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.
👍
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.
This looks good, ping me before merging so we can update code vitals at the same time.
What?
This PR does two things:
Why?
The median has proven stable enough, so we don't need the percentile as well. We are only shipping the median to
codevitals.run
anyway.The TTFB represents a big chunk of the LCP time (50% for classic, 80% for block themes). It influences LCP so much that we are unable to actually detect changes that affect the time it takes the client to render a page.
How?
By subtracting TTFB (median) from LCP.
Testing Instructions
Verify that the front-end metrics include LCP, TTFB, and LCP-TTFB.