---
title: SignpostIntervalMetric
framework: metrickit
role: symbol
role_heading: Structure
path: metrickit/signpostintervalmetric
---

# SignpostIntervalMetric

A metric that measures the duration and count of custom signpost intervals.

## Declaration

```swift
struct SignpostIntervalMetric
```

## Mentioned in

Monitoring app performance with MetricKit

## Discussion

Discussion This metric corresponds to the MetricResult.signpostInterval(_:) case. This metric appears in both intervalEntries and stateEntries when you enable state reporting. Create signpost log handles with logHandle(category:) and wrap each custom operation with mxSignpost(_:dso:log:name:signpostID:_:_:): let networkLog = MetricManager.logHandle(category: "NetworkRequests")

func loadProfile() async {     mxSignpost(.begin, log: networkLog, name: "fetchUserProfile")     await fetchUserProfile()     mxSignpost(.end, log: networkLog, name: "fetchUserProfile") } Signpost intervals measure the duration and frequency of specific code operations, such as network requests, database queries, or image processing. State reporting complements this by segmenting MetricKit metrics by user-visible app state. This type replaces MXSignpostMetric and its nested MXSignpostIntervalData object.

## Topics

### Signpost details

- [signpostName](metrickit/signpostintervalmetric/signpostname.md)
- [signpostCategory](metrickit/signpostintervalmetric/signpostcategory.md)

### Counts and timing

- [totalCount](metrickit/signpostintervalmetric/totalcount.md)
- [signpostDuration](metrickit/signpostintervalmetric/signpostduration.md)

### Additional measurements

- [averageMemory](metrickit/signpostintervalmetric/averagememory.md)
- [cpuTime](metrickit/signpostintervalmetric/cputime.md)
- [logicalWrites](metrickit/signpostintervalmetric/logicalwrites.md)
- [hitchTimeRatio](metrickit/signpostintervalmetric/hitchtimeratio.md)
- [totalHitchTime](metrickit/signpostintervalmetric/totalhitchtime.md)
- [totalAnimationTime](metrickit/signpostintervalmetric/totalanimationtime.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

### Signpost and custom metrics

- [mxSignpost(_:dso:log:name:signpostID:_:_:)](metrickit/mxsignpost(_:dso:log:name:signpostid:_:_:).md)
- [mxSignpostAnimationIntervalBegin(dso:log:name:signpostID:_:_:)](metrickit/mxsignpostanimationintervalbegin(dso:log:name:signpostid:_:_:).md)
