MXHistogram
An object representing a histogram of data values of the same type of unit.
Declaration
class MXHistogram<UnitType> where UnitType : UnitOverview
A histogram measures the number of times a data point for a variable falls into a specific range of possible values within a set of data. Usually, histograms are depicted as bar charts, in which each bar represents a range of values, and the height of each bar represents the number of times the value of the variable falls within a particular range. In this class, each bar is represented by a bucket.
A bucket holds the results for a series of measured values, such as all the events occurring between 3 and 5 seconds. MetricKit uses fixed-width buckets that are device-independent with intervals that are based on the type of metric. Use the bucketStart and bucketEnd properties to find the start and end of an interval.
The returned results contain only buckets with at least one item so bucketEnumerator may not return all intervals.
For example, if the fixed width for the time to resume the app is 10 ms, then the sequence of buckets is:
0…9 ms, 10…19 ms, 20…29 ms, etc.
If there’s data only in the 0…9 ms and 20…29 ms buckets, then the report skips the 10…19 ms bucket.