Web App Performance Metrics Done Right

  1. Measure time starting at event.timeStamp
  2. Measure time ending at performance.now() in a requestAnimationFrame()
  3. Ignore anything that happened while the tab was not focused
  4. Aggregate data using “% of events that are under target”
  5. Visualize multiple thresholds

Superhuman CTO recently posted a really useful and well-reasoned approach to setting up web app performance metrics:

Much more here