---
title: "Aggregation methods for metric queries | Grafana Cloud documentation"
description: "A reference of new aggregation methods for the k6 metric queries."
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/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

Expand table

| 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

Expand table

| Method     | Previous method | Description |
|------------|-----------------|-------------|
| Sum (Last) | Sum (Last)      |             |
| Max (Last) | Max (Last)      |             |

## Rate methods

Expand table

| 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

Expand table

| 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        |
