A directory of the performance timeline
The browser records timing information as a stream of PerformanceEntry objects,
each tagged with an entryType. Knowing which types exist, which interface each
produces, and whether to read them with getEntriesByType() or a
PerformanceObserver is the key to measuring real-user performance and the Core
Web Vitals. This searchable reference lists them all.
How it works
Some entry types are buffered and read directly; the modern vitals are delivered through an observer:
// Buffered: available after load
const nav = performance.getEntriesByType("navigation")[0];
console.log(nav.loadEventEnd - nav.startTime);
// Observer: Core Web Vitals and long tasks
new PerformanceObserver((list) => {
for (const entry of list.getEntries()) {
console.log(entry.entryType, entry.startTime, entry);
}
}).observe({ type: "largest-contentful-paint", buffered: true });
Your own code can add mark and measure entries with performance.mark() and
performance.measure(). Newer types — longtask, layout-shift,
largest-contentful-paint, event — must be observed, and buffered: true
recovers entries that fired before the observer was attached.
Tips and notes
- Use
mark/measureto instrument your own code, then read them back as entries. - Always observe vitals with
buffered: trueso you do not miss the earliest LCP or layout shifts. resourceentries exposetransferSizeandinitiatorTypefor spotting heavy or slow assets.- A
longtaskover 50 ms is a yellow flag for input responsiveness — investigate its attribution.