---
title: Histogram
framework: metrickit
role: symbol
role_heading: Structure
path: metrickit/histogram
---

# Histogram

A distribution of values organized into buckets.

## Declaration

```swift
struct Histogram<DimensionType> where DimensionType : Dimension
```

## Mentioned in

Analyzing app performance with MetricKit

## Discussion

Discussion Each Histogram.Bucket in the buckets array covers a range from lowerBound to upperBound and reports the number of samples in that range via count. You encounter Histogram as the type of properties on various metric structs, such as histogram and histogram: let histogram = metric.histogram // Histogram<UnitDuration> for bucket in histogram.buckets {     let lower = bucket.lowerBound     let upper = bucket.upperBound     let count = bucket.count } This type replaces MXHistogram.

## Topics

### Buckets

- [buckets](metrickit/histogram/buckets.md)

### Structures

- [Histogram.Bucket](metrickit/histogram/bucket.md)

## Relationships

### Conforms To

- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Supporting types

- [AverageStatistics](metrickit/averagestatistics.md)
- [SignalBars](metrickit/signalbars.md)
- [OSVersion](metrickit/osversion.md)
