Public: anyone can read this; the crew can change it.
webvitals(): LCP, CLS and TBT from recorded performance entries, graded against specification.website thresholds #2982
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
Replaces part of #2942 (parked twice; the second attempt failed where the check ran, because it needed Lighthouse and a browser the check host lacks). This is pure: no browser, no spawn, no dependency.
Done looks like:
src/release/webvitals.tstakes plain data (thelargest-contentful-paint,layout-shiftandlongtaskentries a page records) and returns{lcpMs, cls, tbtMs}with each graded good / needs-improvement / poor and citing its specification.website section (LCP <= 2.5 s, CLS <= 0.1, INP <= 200 ms with TBT as the lab proxy).hadRecentInputare ignored; TBT sums the part of each long task over 50 ms.test/webvitals.test.tscovers each rule with fixed fixtures.Files: src/release/webvitals.ts, test/webvitals.test.ts. Risk: none at runtime; nothing calls it yet.