<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetricKit",
  "identifier" : "/documentation/MetricKit/MetalFrameRateMetric",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "MetricKit"
    ],
    "preciseIdentifier" : "s:9MetricKit014MetalFrameRateA0V"
  },
  "title" : "MetalFrameRateMetric"
}
-->

# MetalFrameRateMetric

A metric that measures Metal frame rate statistics for a specific `CAMetalLayer`.

```
struct MetalFrameRateMetric
```

## Discussion

This metric corresponds to the [`MetricResult.metalFrameRate(_:)`](/documentation/MetricKit/MetricResult/metalFrameRate(_:)) case. It appears only in [`intervalEntries`](/documentation/MetricKit/MetricReport/intervalEntries) and is not included in state entries.

Each `MetalFrameRateMetric` corresponds to a single `CAMetalLayer`, identified by [`layerName`](/documentation/MetricKit/MetalFrameRateMetric/layerName). When your app has multiple Metal layers, the report may include multiple instances of this metric case, one for each layer.

## Topics

### Frame rate

[`let framesPerSecond: Measurement<UnitFrequency>`](/documentation/MetricKit/MetalFrameRateMetric/framesPerSecond)

The frame rate associated with this `CAMetalLayer`

[`let frameCount: Int`](/documentation/MetricKit/MetalFrameRateMetric/frameCount)

The total Metal drawable count

[`let activeDrawingDuration: Measurement<UnitDuration>`](/documentation/MetricKit/MetalFrameRateMetric/activeDrawingDuration)

The duration of time spent actively producing new frames

### Layer

[`let layerName: String`](/documentation/MetricKit/MetalFrameRateMetric/layerName)

The `CAMetalLayer` name this metric corresponds to

## Relationships

### Conforms To

[`Encodable`](/documentation/Swift/Encodable)

[`Hashable`](/documentation/Swift/Hashable)

[`Sendable`](/documentation/Swift/Sendable)

[`Equatable`](/documentation/Swift/Equatable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Decodable`](/documentation/Swift/Decodable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)