Skip to content
Tutorials Center
My learning

Topics

Lesson 4 of 37 ยท Getting Started

Lab Data and Field Data

Learn the difference between synthetic lab tests and real user field data, when each is useful, how percentiles work, and how to avoid misleading averages.

There are two ways to measure a website's speed. Lab data comes from a test you run yourself, on a known device and network. Field data comes from real visitors using your site in the wild. They answer different questions, and good teams use both.

This lesson explains the difference, introduces percentiles (the right way to summarise timing data), and shows how to collect a field measurement with a few lines of JavaScript.

Lab data (synthetic testing)

In a lab test a tool loads your page under fixed, repeatable conditions: the same simulated phone, the same throttled network, a cold cache. Browser DevTools and Lighthouse work this way.

Strengths

  • Repeatable, so you can compare before and after a change.
  • Gives deep detail: waterfalls, call stacks, filmstrips.
  • Works before launch, on a staging site, in CI.

Weaknesses

  • Represents one device and one network, not your audience.
  • Cannot capture real interactions, so responsiveness is hard to judge.
  • Does not see geography, ad blockers, extensions, logged-in states or slow phones.

Field data (real user monitoring)

Field data, also called RUM (Real User Monitoring), is collected from actual page views. A small script records metrics in each visitor's browser and sends them to a server. Public datasets such as the Chrome User Experience Report (CrUX) aggregate field data from opted-in Chrome users.

Strengths

  • Reflects the true spread of devices, networks and behaviour.
  • Includes real interactions and long sessions.
  • This is the data search engines use for Core Web Vitals.

Weaknesses

  • Noisy and slower to react (you need traffic and time).
  • Less detail about why something is slow.
  • Needs privacy care and a place to store data.
Lab Field
Source Your test machine Real visitors
Conditions Fixed Varied
Best for Debugging, regression checks Knowing what users really get
Detail High Lower
Available Before launch After launch

Use field data to find out whether you have a problem and who has it. Use lab data to find out why and to test the fix.

Why averages lie

Timing data is usually skewed: most visits are fast, a few are very slow. The average (mean) is pulled up by outliers and hides what typical users feel. Use percentiles instead.

  • The median (p50) is the value half of visits beat.
  • p75 is the value 75% of visits beat. Core Web Vitals are judged at p75.
  • p95 and p99 show the slow tail.
JS Mean versus percentiles

Press Run (or Ctrl + Enter) to see the console output here.

No output.

One awful 9.5 s visit drags the mean to 2.11 s, while the median visitor waited 1.2 s. The mean describes nobody; the percentiles describe real groups.

Collecting a field measurement

The browser offers PerformanceObserver to receive timing entries as they happen. This example observes paint timings and prints which kinds arrived. Because it observes real browser events, it prints only things that are always true.

Observe paint entries

In production you would send each value to your server with navigator.sendBeacon() when the page is hidden, so the request survives the page closing. We cover real monitoring in the chapter on measuring and monitoring.

A sensible workflow

flowchart TD
  F["Field data shows a slow p75"] --> L["Reproduce in the lab"]
  L --> D["Debug and fix"]
  D --> V["Verify in the lab"]
  V --> R["Release"]
  R --> F2["Watch field data improve"]

Field data finds problems, lab data fixes them, and field data confirms the fix.

Remember that field results lag. After a release it can take days of traffic to move a 28-day rolling dataset.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which type of data comes from real visitors?

    Field data is collected in the browsers of real users as they visit.
  2. 2. Why prefer p75 over the mean for timings?

    A few very slow visits inflate the mean, while percentiles describe groups of users.
  3. 3. What is lab data best for?

    Fixed conditions make before-and-after comparisons reliable and give detailed traces.
  4. 4. At which percentile are Core Web Vitals judged?

    A metric is good when 75% of page views meet the threshold.

Summary

  • Lab data is controlled and detailed; field data is real and representative.
  • Use field data to detect problems, lab data to diagnose and verify.
  • Summarise with percentiles (median, p75, p95), never only the mean.
  • PerformanceObserver is the browser API for gathering field metrics.

Next: Core Web Vitals Overview