Contents

AverageStatistics

A value that encapsulates an average measurement with supporting statistical data.

Declaration

struct AverageStatistics<DimensionType> where DimensionType : Dimension

Mentioned in

Discussion

AverageStatistics provides the average value alongside a sample count and standard deviation. When statistical data is unavailable, count is 0 and standardDeviation is negative.

You encounter AverageStatistics as the type of certain metric properties, such as value and averageMemory:

let statistics = metric.value // AverageStatistics<UnitInformationStorage>
print(statistics.average)           // Measurement<UnitInformationStorage>
print(statistics.count)             // Int — number of samples
print(statistics.standardDeviation) // Double — negative if unavailable

This type replaces MXAverage.

Topics

Statistics

See Also

Supporting types