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
Copy file name to clipboardExpand all lines: src/data/markdown/translated-guides/en/02 Using k6/02 Metrics/000-reference.md
+41Lines changed: 41 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,47 @@ In other words, the timestamp happens when k6 receives the end of the response b
45
45
| http_req_duration | Trend | Total time for the request. It's equal to `http_req_sending + http_req_waiting + http_req_receiving` (i.e. how long did the remote server take to process the request and respond, without the initial DNS lookup/connection times). `float`|
46
46
| http_req_failed | Rate | The rate of failed requests according to [setResponseCallback](/javascript-api/k6-http/setresponsecallback). |
47
47
48
+
## Browser metrics {#browser}
49
+
50
+
The [k6 browser module](/using-k6-browser) emits its own metrics based on the [Core Web Vitals](https://web.dev/vitals/#core-web-vitals).
51
+
52
+
53
+
These core metrics will evolve over time when technology changes, but for now, k6 tracks the following core web vitals:
| webvital_largest_content_paint | Measures a page's loading performance. Please refer to [Largest Contentful Paint](https://web.dev/lcp/) for more information. |
58
+
| webvital_first_input_delay | Measures a page's interactivity. Please refer to [First Input Delay](https://web.dev/fid/) for more information. |
59
+
| webvital_cumulative_layout_shift | Measures a page's visual stability. Please refer to [Cumulative Layout Shift](https://web.dev/cls/) for more information. |
60
+
61
+
### Other Web Vitals
62
+
63
+
Apart from the Core Web Vitals, the browser module also reports [Other Web Vitals](https://web.dev/vitals/#other-web-vitals).
| webvital_time_to_first_byte | Measures the time it takes between the browser request and the start of the response from a server. Please refer to [Time to First Byte](https://web.dev/ttfb/) for more information.|
69
+
| webvital_first_contentful_paint | Measures the time it takes for the browser to render the first DOM element on the page, whether that's a text, image or header. Please refer to [First Contentful Paint](https://web.dev/fcp/) for more information. |
70
+
| webvital_interaction_to_next_paint | An experimental metric that measures a page's responsiveness. Please refer to [Interaction to Next Paint](https://web.dev/inp/) for more information. |
71
+
72
+
### Legacy browser metrics
73
+
74
+
<Blockquotemod="note"title="">
75
+
76
+
As of [k6 version 0.44.0](https://github.com/grafana/k6/releases/tag/v0.44.0), k6 now natively supports [Google's Core Web Vitals](https://web.dev/vitals/#core-web-vitals). In future releases, to align with recommended practices, we will remove the following browser metrics to focus on the web vital metrics. Please refer to [#831](https://github.com/grafana/xk6-browser/issues/831) for more information.
77
+
78
+
</Blockquote>
79
+
80
+
Apart from the usual HTTP specific metrics that k6 already tracks, the browser module tracks the following browser specific performance metrics on top:
| browser_dom_content_loaded | Emitted when the page is loaded but scripts have just started to be executed. |
85
+
| browser_first_paint | Emitted when the browser renders the first pixel on the page. |
86
+
| browser_loaded | Emitted when the page is fully loaded. |
87
+
88
+
48
89
## Built-in WebSocket metrics
49
90
50
91
`k6` emits the following metrics when interacting with a WebSocket service through the [`experimental`](/javascript-api/k6-experimental/websockets) or legacy websockets API.
Collapse file: src/data/markdown/translated-guides/en/03 Using k6 browser/03 Metrics.md
| webvital_largest_content_paint | Measures a page's loading performance. Please refer to [Largest Contentful Paint](https://web.dev/lcp/) for more information. |
26
-
| webvital_first_input_delay | Measures a page's interactivity. Please refer to [First Input Delay](https://web.dev/fid/) for more information. |
27
-
| webvital_cumulative_layout_shift | Measures a page's visual stability. Please refer to [Cumulative Layout Shift](https://web.dev/cls/) for more information. |
28
-
29
-
### Other Web Vitals
30
-
31
-
Apart from the Core Web Vitals, the browser module also reports [Other Web Vitals](https://web.dev/vitals/#other-web-vitals).
| webvital_time_to_first_byte | Measures the time it takes between the browser request and the start of the response from a server. Please refer to [Time to First Byte](https://web.dev/ttfb/) for more information.|
37
-
| webvital_first_contentful_paint | Measures the time it takes for the browser to render the first DOM element on the page, whether that's a text, image or header. Please refer to [First Contentful Paint](https://web.dev/fcp/) for more information. |
38
-
| webvital_interaction_to_next_paint | An experimental metric that measures a page's responsiveness. Please refer to [Interaction to Next Paint](https://web.dev/inp/) for more information. |
39
-
40
21
### Why are they important?
41
22
42
23
The Core Web Vitals comprise one of [Google's Page Experience Signals](https://developers.google.com/search/docs/appearance/page-experience). A positive page experience naturally leads to better quality and better search engine rankings. These golden metrics help you understand which areas of your frontend application need optimization so your pages can rank higher than similar content.
43
24
44
25
Existing browser measures such as the `Load` and `DOMContentLoaded` time do not accurately reflect the user's experience very well as they used to. Relying on these load events does not give the correct metric to analyze critical performance bottlenecks that your page might have. Google's Web Vitals is a better measure of your page's performance as well as your page's user experience.
45
26
46
-
## Existing browser metrics
47
-
48
-
<Blockquotemod="note"title="">
49
-
50
-
As of [k6 version 0.44.0](https://github.com/grafana/k6/releases/tag/v0.44.0), k6 now natively supports [Google's Core Web Vitals](https://web.dev/vitals/#core-web-vitals). In future releases, to align with recommended practices, we will remove the following browser metrics to focus on the web vital metrics. Please refer to [#831](https://github.com/grafana/xk6-browser/issues/831) for more information.
51
-
52
-
</Blockquote>
53
-
54
-
Apart from the usual HTTP specific metrics that k6 already tracks, the browser module tracks the following browser specific performance metrics on top:
0 commit comments