---
title: "Built-in metrics | Grafana k6 documentation"
description: "A reference of built-in metrics for different supported protocols."
---

# Built-in metrics

Every k6 test emits built-in and [custom metrics](/docs/k6/latest/using-k6/metrics/create-custom-metrics/). Each supported protocol also has its specific metrics.

## Standard built-in metrics

k6 always collects the following metrics, no matter what protocol the test uses:

Expand table

| Metric Name         | Type                                                          | Description                                                                                                                                                                                                                                                                                |
|---------------------|---------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| checks              | [Rate](/docs/k6/latest/javascript-api/k6-metrics/rate/)       | The rate of successful checks. In the end-of-test summary, this metric is displayed as three values: `checks_total` (Counter), `checks_succeeded` (Rate), and `checks_failed` (Rate). These display values are not emitted to output backends and cannot be used in thresholds.            |
| data\_received      | [Counter](/docs/k6/latest/javascript-api/k6-metrics/counter/) | The amount of received data. [This example covers how to track data for an individual URL](/docs/k6/latest/examples/track-transmitted-data-per-url/).                                                                                                                                      |
| data\_sent          | [Counter](/docs/k6/latest/javascript-api/k6-metrics/counter/) | The amount of data sent. [Track data for an individual URL](/docs/k6/latest/examples/track-transmitted-data-per-url/) to track data for an individual URL.                                                                                                                                 |
| dropped\_iterations | [Counter](/docs/k6/latest/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](/docs/k6/latest/using-k6/scenarios/concepts/dropped-iterations/) for more details. |
| iteration\_duration | [Trend](/docs/k6/latest/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](/docs/k6/latest/using-k6/workaround-iteration-duration/).                                  |
| iterations          | [Counter](/docs/k6/latest/javascript-api/k6-metrics/counter/) | The aggregate number of times the VUs execute the JS script (the `default` function).                                                                                                                                                                                                      |
| vus                 | [Gauge](/docs/k6/latest/javascript-api/k6-metrics/gauge/)     | Current number of active virtual users                                                                                                                                                                                                                                                     |
| vus\_max            | [Gauge](/docs/k6/latest/javascript-api/k6-metrics/gauge/)     | Max possible number of virtual users (VU resources are [pre-allocated](/docs/k6/latest/using-k6/scenarios/concepts/arrival-rate-vu-allocation/), to avoid affecting performance when scaling up load).                                                                                     |

## HTTP-specific built-in metrics

These metrics are generated only when the test makes HTTP requests.

> Note
> 
> For all `http_req_*` metrics, **the timestamp is emitted the end of the request.** In other words, the timestamp happens when k6 receives the end of the response body, or the request times out.

Expand table

| Metric Name                 | Type                                                          | Description                                                                                                                                                                                                                                  |
|-----------------------------|---------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| http\_req\_blocked          | [Trend](/docs/k6/latest/javascript-api/k6-metrics/trend/)     | Time spent blocked (waiting for a free TCP connection slot) before initiating the request. `float`                                                                                                                                           |
| http\_req\_connecting       | [Trend](/docs/k6/latest/javascript-api/k6-metrics/trend/)     | Time spent establishing TCP connection to the remote host. `float`                                                                                                                                                                           |
| http\_req\_duration         | [Trend](/docs/k6/latest/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` |
| http\_req\_failed           | [Rate](/docs/k6/latest/javascript-api/k6-metrics/rate/)       | The rate of failed requests according to [setResponseCallback](/docs/k6/latest/javascript-api/k6-http/set-response-callback/).                                                                                                               |
| http\_req\_receiving        | [Trend](/docs/k6/latest/javascript-api/k6-metrics/trend/)     | Time spent receiving response data from the remote host. `float`                                                                                                                                                                             |
| http\_req\_sending          | [Trend](/docs/k6/latest/javascript-api/k6-metrics/trend/)     | Time spent sending data to the remote host. `float`                                                                                                                                                                                          |
| http\_req\_tls\_handshaking | [Trend](/docs/k6/latest/javascript-api/k6-metrics/trend/)     | Time spent handshaking TLS session with remote host                                                                                                                                                                                          |
| http\_req\_waiting          | [Trend](/docs/k6/latest/javascript-api/k6-metrics/trend/)     | Time spent waiting for response from remote host (a.k.a. “time to first byte”, or “TTFB”). `float`                                                                                                                                           |
| http\_reqs                  | [Counter](/docs/k6/latest/javascript-api/k6-metrics/counter/) | How many total HTTP requests k6 generated.                                                                                                                                                                                                   |

## Browser metrics

The [k6 browser module](/docs/k6/latest/using-k6-browser/) emits its own metrics based on the [Core Web Vitals](https://web.dev/vitals/#core-web-vitals).

These core metrics will evolve over time when technology changes, but for now, k6 tracks the following core web vitals:

Expand table

| Metric name              | Description                                                                                                                                                                                             |
|--------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| browser\_web\_vital\_cls | Measures the visual stability on a webpage by quantifying the amount of unexpected layout shift of visible page content. Refer to [Cumulative Layout Shift](https://web.dev/cls/) for more information. |
| browser\_web\_vital\_inp | A metric that measures a page’s responsiveness. Refer to [Interaction to Next Paint](https://web.dev/inp/) for more information.                                                                        |
| browser\_web\_vital\_lcp | Measures the time it takes for the largest content element on a page to become visible. Refer to [Largest Contentful Paint](https://web.dev/lcp/) for more information.                                 |

### Other Web Vitals

Apart from the Core Web Vitals, the browser module also reports [Other Web Vitals](https://web.dev/vitals/#other-web-vitals).

Expand table

| Metric name               | Description                                                                                                                                                                                                   |
|---------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| browser\_web\_vital\_fcp  | 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. Refer to [First Contentful Paint](https://web.dev/fcp/) for more information. |
| browser\_web\_vital\_ttfb | Measures the time it takes between the browser request and the start of the response from a server. Refer to [Time to First Byte](https://web.dev/ttfb/) for more information.                                |

## Built-in WebSocket metrics

`k6` emits the following metrics when interacting with a WebSocket service through the [`k6/websockets`](/docs/k6/latest/javascript-api/k6-websockets/) or legacy `k6/ws` API.

Expand table

| Metric name           | Type                                                          | Description                                                                                                  |
|-----------------------|---------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|
| ws\_connecting        | [Trend](/docs/k6/latest/javascript-api/k6-metrics/trend/)     | Total duration for the WebSocket connection request.                                                         |
| ws\_msgs\_received    | [Counter](/docs/k6/latest/javascript-api/k6-metrics/counter/) | Total number of messages received                                                                            |
| ws\_msgs\_sent        | [Counter](/docs/k6/latest/javascript-api/k6-metrics/counter/) | Total number of messages sent                                                                                |
| ws\_ping              | [Trend](/docs/k6/latest/javascript-api/k6-metrics/trend/)     | Duration between a ping request and its pong reception                                                       |
| ws\_session\_duration | [Trend](/docs/k6/latest/javascript-api/k6-metrics/trend/)     | Duration of the WebSocket session. Time between the start of the connection and the end of the VU execution. |
| ws\_sessions          | [Counter](/docs/k6/latest/javascript-api/k6-metrics/counter/) | Total number of started WebSocket sessions.                                                                  |

## Built-in gRPC metrics

k6 emits the following metrics when it interacts with a service through the [`gRPC`](/docs/k6/latest/javascript-api/k6-net-grpc/) API.

Expand table

| Metric Name                   | Type                                                          | Description                               |
|-------------------------------|---------------------------------------------------------------|-------------------------------------------|
| grpc\_req\_duration           | [Trend](/docs/k6/latest/javascript-api/k6-metrics/trend/)     | Time to receive response from remote host |
| grpc\_streams                 | [Counter](/docs/k6/latest/javascript-api/k6-metrics/counter/) | Total number of started streams           |
| grpc\_streams\_msgs\_received | [Counter](/docs/k6/latest/javascript-api/k6-metrics/counter/) | Total number of messages received         |
| grpc\_streams\_msgs\_sent     | [Counter](/docs/k6/latest/javascript-api/k6-metrics/counter/) | Total number of messages sent             |

> Note
> 
> Steams-related metrics (`grpc_streams*`) are available only on `k6` version `0.49.0` or higher or when using the `k6/experimental/grpc` module, which is available on `k6` version `0.45.0`.
