Web Vitals and Performance Lab
Capability fixtures producing known, bounded Web Vitals and performance-budget values so crawler tests can validate LCP, CLS, TBT/TTI, FCP, and TTFB capture plus per-category transferred-size buckets.
Capability fixtures, not hint fixtures: nothing in this group deliberately triggers a hint, and every registry entry carries an empty hint list by design. The expected crawler signal is a metric moving into a defined band relative to the calibration baseline from the same crawl, never an exact number.
Families:
- Calibration baseline: a minimal page with inline critical CSS only and no external resources; every other fixture in the group is asserted relative to this page’s values.
- Layout shift: a 192px banner injected as the first body child at a
fixed 2,000ms, with 120vh of content below so the expected CLS is computed
from geometry (
192 / viewportHeight). The capture window must stay open at least 3,000ms. - Largest Contentful Paint: a hero image injected into a pre-reserved container at a fixed 4,000ms, so LCP is lower-bounded by construction and CLS stays in the baseline band. Capture windows shorter than 5,500ms miss the LCP candidate entirely — that requirement is itself under test.
- Main-thread blocking: exactly three 300ms wall-clock busy loops separated by 100ms yields, run once only, bounding added main-thread work at 900ms per load regardless of CPU speed (TBT band 600–900ms).
- Time to first byte: a delay endpoint that sleeps exactly 2,500ms
before the first byte (poor band), concurrency-capped at 8 with a
429+Retry-Afteroverflow; risky-manifest, direct entry only. - Performance budgets: one deliberately heavy resource per transferred-size bucket — document, script, stylesheet, image, media, font, and third-party — served with identity encoding so transferred size tracks committed size. Timing metrics on budget pages degrade incidentally and are explicitly not asserted.
All vitals are lab measurements: absolute values depend on hardware and capture configuration, so fixtures pin the page-side contribution (a delay, a busy-loop duration, an element geometry, a byte count) and assert bands or orderings relative to the baseline.
Fixtures in this category
- Web vitals calibration baseline —
vitals-baseline-fast(safe) - Layout shift — late-injected banner —
vitals-cls-late-banner(moderate) - LCP — late-injected hero image —
vitals-lcp-late-hero(moderate) - TBT — three bounded long tasks —
vitals-tbt-long-tasks(moderate) - Performance budget — document bucket —
vitals-budget-document(moderate) - Performance budget — script bucket —
vitals-budget-script(moderate) - Performance budget — stylesheet bucket —
vitals-budget-stylesheet(moderate) - Performance budget — image bucket —
vitals-budget-image(moderate) - Performance budget — media bucket —
vitals-budget-media(moderate) - Performance budget — font bucket —
vitals-budget-font(moderate) - Performance budget — third-party bucket —
vitals-budget-third-party(moderate)