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/03 Using k6 browser/03 Metrics.md
+25-15Lines changed: 25 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,32 +5,38 @@ excerpt: 'An overview of the different browser performance metrics that the brow
5
5
6
6
Follow along to learn about:
7
7
8
-
1. Google's Core Web Vitals and why they are important
9
-
2. The existing browser metrics that k6 browser tracks
10
-
3. How to analyze the browser metrics output
11
-
4. How to set thresholds for your browser metrics
8
+
- Google's Core Web Vitals and why they are important
9
+
- How to analyze the browser metrics output
10
+
- How to set thresholds for your browser metrics
12
11
13
12
## Google's Core Web Vitals
14
13
15
-
To provide users with the best user experience, Google introduced [Core Web Vitals](https://web.dev/vitals/#core-web-vitals) which consists of three important metrics to help you measure your user's experience when using your web application. In a nutshell, it gives you an indication of your page's:
14
+
The k6 browser module emits metrics based on the [Core Web Vitals](https://web.dev/vitals/#core-web-vitals).
15
+
This section provides some conceptual background about the core vital.
16
+
To review the complete list browser metrics, refer to the section in the [Metrics reference](/using-k6/metrics/reference#browser).
16
17
17
-
1. loading performance,
18
-
2. interactivity,
19
-
3. and visual stability.
18
+
Google introduced these metrics to provided unified signals to assess user experience on the web.
19
+
The vitals are composed ofthree important metrics to help user experience when using your web application.
20
20
21
-
### Why are they important?
21
+
- Loading performance
22
+
- Interactivity
23
+
- And visual stability
22
24
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.
25
+
### Why web vitals
24
26
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.
27
+
The Core Web Vitals are 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.
28
+
29
+
Existing browser measures, such as `Load` and `DOMContentLoaded` times, no longer accurately reflect user experience very well.
30
+
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 performance and its user experience.
26
31
27
32
## Understanding the browser metrics output
28
33
29
-
When a browser test is finished, k6 reports a top-level overview of the aggregated browser metrics output. A sample of which you can see below.
34
+
When a browser test finishes, k6 reports a top-level overview of the aggregated browser metrics output.
35
+
The following snippet is an example:
30
36
31
37
<Blockquotemod="note"title="">
32
38
33
-
As mentioned previously, in future releases, the `browser_*` metrics will be removed in favour of the web vitals. As Google also recommends measuring the 75th percentile for each web vital metric, there will still be future tweaks to improve the summary output.
39
+
In future releases, the `browser_*` metrics will be removed in favor of the web vitals. As Google also recommends measuring the 75th percentile for each web vital metric, there will still be future tweaks to improve the summary output.
34
40
35
41
</Blockquote>
36
42
@@ -60,9 +66,13 @@ You can also visualize these results in different ways depending on your team's
60
66
61
67
## Set thresholds for your browser metrics
62
68
63
-
The great thing about the browser module is it can easily use all of k6's key functionalities, such as [Thresholds](https://k6.io/docs/using-k6/thresholds/).
69
+
The browser module can use all key k6 functionalities, such as [Thresholds](https://k6.io/docs/using-k6/thresholds/).
70
+
71
+
To set thresholds for your browser metrics:
72
+
1. Add the metric you want to check.
73
+
1. Specify its threshold value.
64
74
65
-
To set thresholds for your browser metrics, add the metric you want to check and specify its threshold value. As seen in the example below, you can also pass in different URLs if you're going to set a threshold for other pages, especially when your script contains page navigations.
75
+
As the following example shows, you can also pass in different URLs if you're going to set a threshold for other pages, especially when your script contains page navigations.
0 commit comments