Documentation for automated readers
A curated documentation index is available at: https://grafana.com/llms.txt
A complete documentation index is available at: https://grafana.com/llms-full.txt
These indexes can help with page discovery before fetching individual documents.
This page is also available in Markdown, which may be easier for automated readers and AI tools to parse than HTML. The Markdown version is available at https://grafana.com/docs/grafana-cloud/testing/k6/reference/query-types/metric-query-aggregation-methods.md, or by sending Accept: text/markdown to https://grafana.com/docs/grafana-cloud/testing/k6/reference/query-types/metric-query-aggregation-methods/. For broader documentation discovery, the curated index is available at https://grafana.com/llms.txt and the complete index is available at 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


