demo · v144

INP Budget Tracker

Compute live INP (Interaction to Next Paint) using only PerformanceEventTiming + interactionCount. Click the button with optional blocking work and watch the p98 number stabilise — this is what every RUM library does.

interactionCount: checking…

interactionCount
0
events observed
0
p98 INP (ms)
worst (ms)

the API

const po = new PerformanceObserver(list => {
  for (const e of list.getEntries()) {
    if (e.interactionId) durations.push(e.duration);
  }
});
po.observe({ type: "event", buffered: true, durationThreshold: 16 });
// New in v144: performance.eventCounts and performance.interactionCount
// are the denominators you need for a correct p98.

see also