integrate(set[])

Given an arbitrary number of series, performs a numerical integration on each series to return a set of equal length. This is equivalent to computing the cumulative sum over the series, where each point in the returned series is the sum of the current point and the accumulated sum of all previous points in the series.

Example:

The following expression plots the sum of AWS.EC2.CPUCreditUsage and all previous values of AWS.EC2.CPUCreditUsage which display in a given time period. The series in the example includes the optional fields period and function, which if removed will default to the metric’s native period and a summary statistic of mean.

integrate(sum(s("AWS.EC2.CPUCreditUsage", "*", { period:"60", function:"sum" })))

The chart below demonstrates how the integration expression (provided above) starts at the actual value of the metric and continuously climbs at the rate of the next metric value provided.

integrate-example-1

Comparing the rising metric value minute over minute you will see the composite metric increase from 76.66 to 91.74. This is an increase of 15.08, the value of AWS.EC2.CPUCreditUsage.

integrate-example-2