MetricAggregate
The MetricAggregate
type describes a custom function that takes an array of numbers and returns an aggregate that is used as a Metric
.
(
numbers: number[],
length: number,
): Metric
Type | Description | |
---|---|---|
numbers | number[] | The array of numbers in the |
length | number | The length of the array of numbers in the |
returns | Metric | The value of the |
There are a number of common predefined aggregators, such as for counting, summing, and averaging values. This type is instead used for when you wish to use a more complex aggregation of your own devising. See the setMetricDefinition
method for more examples.
Since
v1.0.0