Skip to content

Commit a108afc

Browse files
committed
refactor: link builtin metrics to definitions
1 parent 3ce6dac commit a108afc

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

docs/sources/k6/next/using-k6/metrics/reference.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ k6 always collects the following metrics, no matter what protocol the test uses:
1515

1616
| Metric Name | Type | Description |
1717
| ------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
18-
| checks | Rate | The rate of successful checks. |
19-
| data_received | Counter | The amount of received data. [This example covers how to track data for an individual URL](https://grafana.com/docs/k6/<K6_VERSION>/examples/track-transmitted-data-per-url). |
20-
| data_sent | Counter | The amount of data sent. [Track data for an individual URL](https://grafana.com/docs/k6/<K6_VERSION>/examples/track-transmitted-data-per-url) to track data for an individual URL. |
21-
| dropped_iterations | Counter | The number of iterations that weren't started due to lack of VUs (for the arrival-rate executors) or lack of time (expired maxDuration in the iteration-based executors). Refer to [Dropped iterations](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/scenarios/concepts/dropped-iterations) for more details. |
22-
| iteration_duration | Trend | The time to complete one full iteration, including time spent in `setup` and `teardown`. To calculate the duration of the iteration's function for the specific scenario, [try this workaround](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/workaround-iteration-duration). |
23-
| iterations | Counter | The aggregate number of times the VUs execute the JS script (the `default` function). |
24-
| vus | Gauge | Current number of active virtual users |
25-
| vus_max | Gauge | Max possible number of virtual users (VU resources are [pre-allocated](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/scenarios/concepts/arrival-rate-vu-allocation), to avoid affecting performance when scaling up load). |
18+
| checks | [Rate](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-metrics/rate/) | The rate of successful checks. |
19+
| data_received | [Counter](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-metrics/counter/) | The amount of received data. [This example covers how to track data for an individual URL](https://grafana.com/docs/k6/<K6_VERSION>/examples/track-transmitted-data-per-url). |
20+
| data_sent | [Counter](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-metrics/counter/) | The amount of data sent. [Track data for an individual URL](https://grafana.com/docs/k6/<K6_VERSION>/examples/track-transmitted-data-per-url) to track data for an individual URL. |
21+
| dropped_iterations | [Counter](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-metrics/counter/) | The number of iterations that weren't started due to lack of VUs (for the arrival-rate executors) or lack of time (expired maxDuration in the iteration-based executors). Refer to [Dropped iterations](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/scenarios/concepts/dropped-iterations) for more details. |
22+
| iteration_duration | [Trend](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-metrics/trend/) | The time to complete one full iteration, including time spent in `setup` and `teardown`. To calculate the duration of the iteration's function for the specific scenario, [try this workaround](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/workaround-iteration-duration). |
23+
| iterations | [Counter](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-metrics/counter/) | The aggregate number of times the VUs execute the JS script (the `default` function). |
24+
| vus | [Gauge](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-metrics/gauge/) | Current number of active virtual users |
25+
| vus_max | [Gauge](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-metrics/gauge/) | Max possible number of virtual users (VU resources are [pre-allocated](https://grafana.com/docs/k6/<K6_VERSION>/using-k6/scenarios/concepts/arrival-rate-vu-allocation), to avoid affecting performance when scaling up load). |
2626

2727
## HTTP-specific built-in metrics {#http}
2828

@@ -37,15 +37,15 @@ In other words, the timestamp happens when k6 receives the end of the response b
3737

3838
| Metric Name | Type | Description |
3939
| ------------------------ | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
40-
| http_req_blocked | Trend | Time spent blocked (waiting for a free TCP connection slot) before initiating the request. `float` |
41-
| http_req_connecting | Trend | Time spent establishing TCP connection to the remote host. `float` |
42-
| 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` |
43-
| http_req_failed | Rate | The rate of failed requests according to [setResponseCallback](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/set-response-callback). |
44-
| http_req_receiving | Trend | Time spent receiving response data from the remote host. `float` |
45-
| http_req_sending | Trend | Time spent sending data to the remote host. `float` |
46-
| http_req_tls_handshaking | Trend | Time spent handshaking TLS session with remote host |
47-
| http_req_waiting | Trend | Time spent waiting for response from remote host (a.k.a. “time to first byte”, or “TTFB”). `float` |
48-
| http_reqs | Counter | How many total HTTP requests k6 generated. |
40+
| http_req_blocked | [Trend](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-metrics/trend/) | Time spent blocked (waiting for a free TCP connection slot) before initiating the request. `float` |
41+
| http_req_connecting | [Trend](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-metrics/trend/) | Time spent establishing TCP connection to the remote host. `float` |
42+
| http_req_duration | [Trend](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-metrics/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` |
43+
| http_req_failed | [Rate](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-metrics/rate/) | The rate of failed requests according to [setResponseCallback](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-http/set-response-callback). |
44+
| http_req_receiving | [Trend](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-metrics/trend/) | Time spent receiving response data from the remote host. `float` |
45+
| http_req_sending | [Trend](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-metrics/trend/) | Time spent sending data to the remote host. `float` |
46+
| http_req_tls_handshaking | [Trend](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-metrics/trend/) | Time spent handshaking TLS session with remote host |
47+
| http_req_waiting | [Trend](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-metrics/trend/) | Time spent waiting for response from remote host (a.k.a. “time to first byte”, or “TTFB”). `float` |
48+
| http_reqs | [Counter](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-metrics/counter/) | How many total HTTP requests k6 generated. |
4949

5050
## Browser metrics {#browser}
5151

@@ -67,23 +67,23 @@ Apart from the Core Web Vitals, the browser module also reports [Other Web Vital
6767

6868
| Metric name | Type | Description |
6969
| ------------------- | ------- | ------------------------------------------------------------------------------------------------------------ |
70-
| ws_connecting | Trend | Total duration for the WebSocket connection request. |
71-
| ws_msgs_received | Counter | Total number of messages received |
72-
| ws_msgs_sent | Counter | Total number of messages sent |
73-
| ws_ping | Trend | Duration between a ping request and its pong reception |
74-
| ws_session_duration | Trend | Duration of the WebSocket session. Time between the start of the connection and the end of the VU execution. |
75-
| ws_sessions | Counter | Total number of started WebSocket sessions. |
70+
| ws_connecting | [Trend](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-metrics/trend/) | Total duration for the WebSocket connection request. |
71+
| ws_msgs_received | [Counter](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-metrics/counter/) | Total number of messages received |
72+
| ws_msgs_sent | [Counter](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-metrics/counter/) | Total number of messages sent |
73+
| ws_ping | [Trend](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-metrics/trend/) | Duration between a ping request and its pong reception |
74+
| ws_session_duration | [Trend](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-metrics/trend/) | Duration of the WebSocket session. Time between the start of the connection and the end of the VU execution. |
75+
| ws_sessions | [Counter](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-metrics/counter/) | Total number of started WebSocket sessions. |
7676

7777
## Built-in gRPC metrics {#grpc}
7878

7979
k6 emits the following metrics when it interacts with a service through the [`gRPC`](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-net-grpc/) API.
8080

8181
| Metric Name | Type | Description |
8282
| -------------------------- | ------- | ----------------------------------------- |
83-
| grpc_req_duration | Trend | Time to receive response from remote host |
84-
| grpc_streams | Counter | Total number of started streams |
85-
| grpc_streams_msgs_received | Counter | Total number of messages received |
86-
| grpc_streams_msgs_sent | Counter | Total number of messages sent |
83+
| grpc_req_duration | [Trend](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-metrics/trend/) | Time to receive response from remote host |
84+
| grpc_streams | [Counter](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-metrics/counter/) | Total number of started streams |
85+
| grpc_streams_msgs_received | [Counter](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-metrics/counter/) | Total number of messages received |
86+
| grpc_streams_msgs_sent | [Counter](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-metrics/counter/) | Total number of messages sent |
8787

8888
{{< admonition type="note" >}}
8989

0 commit comments

Comments
 (0)