You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Integrate CrUX data into performance trace summaries (#733)
We upgrade the performance trace tools to include real-user experience
data from the Chrome User Experience Report (CrUX).
https://developer.chrome.com/docs/cruxhttps://developer.chrome.com/docs/crux/methodology
### Deets
* When a trace is stopped, the server now extracts the primary
navigation URLs from the trace (determined by insightSets).
* It calls the public CrUX API to fetch field metrics (LCP, INP, CLS)
for each unique URL/Origin.
* The formatting of crux data is handled by upstream TraceFormatter, but
it looks like this:
```md
Metrics (field / real users):
- LCP: 2595 ms (scope: url)
- LCP breakdown:
- TTFB: 1273 ms (scope: url)
- Load delay: 86 ms (scope: url)
- Load duration: 451 ms (scope: url)
- Render delay: 786 ms (scope: url)
- INP: 140 ms (scope: url)
- CLS: 0.06 (scope: url)
- The above data is from CrUX–Chrome User Experience Report. It's how the page performs for real users.
- The values shown above are the p75 measure of all real Chrome users
- The scope indicates if the data came from the entire origin, or a specific url
- Lab metrics describe how this specific page load performed, while field metrics are an aggregation of results from real-world users. Best practice is to prioritize metrics that are bad in field data. Lab metrics may be better or worse than fields metrics depending on the developer's machine, network, or the actions performed while tracing.
```
**Privacy Considerations:**
* Updates the server README to inform users that performance analysis tools may send trace URLs to the Google CrUX API.
* Adds a notification message to the server startup logs regarding the CrUX API interaction.
Doc: go/crux-in-bifrost
Fixes b/446630695
---------
Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>
Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
Copy file name to clipboardExpand all lines: README.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,12 @@ allowing them to inspect, debug, and modify any data in the browser or DevTools.
27
27
Avoid sharing sensitive or personal information that you don't want to share with
28
28
MCP clients.
29
29
30
+
Performance tools may send trace URLs to the Google CrUX API to fetch real-user
31
+
experience data. This helps provide a holistic performance picture by
32
+
presenting field data alongside lab data. This data is collected by the [Chrome
33
+
User Experience Report (CrUX)](https://developer.chrome.com/docs/crux). To disable
34
+
this, run with the `--no-performance-crux` flag.
35
+
30
36
## **Usage statistics**
31
37
32
38
Google collects usage statistics (such as tool invocation success rates, latency, and environment information) to improve the reliability and performance of Chrome DevTools MCP.
@@ -466,6 +472,11 @@ The Chrome DevTools MCP server supports the following configuration option:
466
472
-**Type:** boolean
467
473
-**Default:**`true`
468
474
475
+
-**`--performanceCrux`/ `--performance-crux`**
476
+
Set to false to disable sending URLs from performance traces to CrUX API to get field performance data.
477
+
-**Type:** boolean
478
+
-**Default:**`true`
479
+
469
480
-**`--usageStatistics`/ `--usage-statistics`**
470
481
Set to false to opt-out of usage statistics collection. Google collects usage data to improve the tool, handled under the Google Privacy Policy (https://policies.google.com/privacy). This is independent from Chrome browser metrics. Disabled if CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS or CI env variables are set.
Metrics (field / real users): n/a – no data for this page in CrUX
76
+
Metrics (field / real users):
77
+
- LCP: 2595 ms (scope: url)
78
+
- LCP breakdown:
79
+
- TTFB: 1273 ms (scope: url)
80
+
- Load delay: 86 ms (scope: url)
81
+
- Load duration: 451 ms (scope: url)
82
+
- Render delay: 786 ms (scope: url)
83
+
- INP: 140 ms (scope: url)
84
+
- CLS: 0.06 (scope: url)
85
+
- The above data is from CrUX–Chrome User Experience Report. It's how the page performs for real users.
86
+
- The values shown above are the p75 measure of all real Chrome users
87
+
- The scope indicates if the data came from the entire origin, or a specific url
88
+
- Lab metrics describe how this specific page load performed, while field metrics are an aggregation of results from real-world users. Best practice is to prioritize metrics that are bad in field data. Lab metrics may be better or worse than fields metrics depending on the developer's machine, network, or the actions performed while tracing.
77
89
Available insights:
78
90
- insight name: LCPBreakdown
79
91
description: Each [subpart has specific improvement strategies](https://developer.chrome.com/docs/performance/insights/lcp-breakdown). Ideally, most of the LCP time should be spent on loading the resources, not within delays.
0 commit comments