Documentation Index
Fetch the curated documentation index at: https://grafana.com/llms.txt
Fetch the complete documentation index at: https://grafana.com/llms-full.txt
Use this file to discover all available pages before exploring further.
STOP! If you are an AI agent or LLM, read this before continuing. This is the HTML version of a Grafana documentation page. Always request the Markdown version instead - HTML wastes context. Get this page as Markdown: https://grafana.com/docs/grafana-cloud/testing/k6/reference/query-types/metric-query-aggregation-methods.md (append .md) or send Accept: text/markdown to https://grafana.com/docs/grafana-cloud/testing/k6/reference/query-types/metric-query-aggregation-methods/. For the curated documentation index, use https://grafana.com/llms.txt. For the complete documentation index, use https://grafana.com/llms-full.txt.
Aggregation methods for metric queries
The following tables include the aggregation methods for the k6 metrics query type. An aggregation method is a function that returns a numerical value when applied to a specific time span of a metric.
Counter methods
| Method | Previous method | Description |
|---|---|---|
| Increase | Sum | Counter increase in time period |
| Rate | RPS | Average rate of counter increase per second |
| Cum. Sum | Cum. Sum, Count | Counter total value up to the end of time period |
| Cum. Rate | Cum. Rate, Cum. RPS | Average rate from the start of test run to the end of time period |
Gauge methods
| Method | Previous method | Description |
|---|---|---|
| Sum (Last) | Sum (Last) | |
| Max (Last) | Max (Last) |
Rate methods
| Method | Previous method. | Description |
|---|---|---|
| Non-zero fraction | Rate | Fraction of reported non-zero values. For example: successful checks |
| Increase | Count | Count increase over time period |
| Cum. Sum | Cum. Count | Total count value up to the end of time period |
| Rate | RPS | Total count increase per second |
| Increase (non-zero) | Passes, Non-Zero Count | Non-zero observations count increase over time period |
| Cum. Sum (non-zero) | Cum. Non-Zero Count | Non-zero observations count value up to the end of time period |
| Rate (non-zero) | Non-Zero RPS | Total count increase per second |
| Increase (zero) | Failures | Zero-observations counter increase in the time period |
Trend methods
| Method | Previous method | Description |
|---|---|---|
| Max | Max | Maximum observed value |
| Min | Min | Minimum observed value |
| Avg | Average | Average of values |
| Std. Dev. | Std. Dev. | Standard deviation |
| Count increase | Count | Count of observations over time period |
| Cum. Count | Cum. Count | Total count of observations stored in Trend metric |
| Cum. Min | Cum. Min | Cumulative minimum observed value |
| Cum. Max | Cum. Max | Cumulative maximum observed value |
| Cum. Avg | Cum. Avg., Cum. Mean | Cumulative average of values |
| Cum. Std. Dev. | Cum. Std. Dev. | Cumulative standard deviation |
| Median | Median | |
| 75th percentile | 75th Percentile | |
| 90th percentile | 90th Percentile | |
| 95th percentile | 95th Percentile | |
| 99th percentile | 99th Percentile | |
| Rate | Histogram count rate | Average rate of counter increase per second |
Was this page helpful?
Related resources from Grafana Labs


