---
title: OSSignposter
framework: os
role: symbol
role_heading: Structure
path: os/ossignposter
---

# OSSignposter

An object for measuring task performance using the unified logging system.

## Declaration

```swift
struct OSSignposter
```

## Mentioned in

Recording Performance Data

## Overview

Overview Signposts allow you to record meaningful information about the duration of your app’s tasks using the same subsystems and categories that you use for logging. Use OSSignposter to create signposted intervals in your code, and then use Instruments’ os_signposts instrument to record those intervals as you run your app and perform the actions to measure. Instruments displays signpost data visually in a timeline.

To add a signposted interval, create a signpost ID — an identifier that disambiguates intervals that have the same name, subsystem, and category, and that exist within the same scope — and then add a call to one of the class’s beginInterval methods just before the code you want to measure. Retain the interval state it returns, and end the interval by passing that state to one of the class’s endInterval methods, which you call immediately after the measured code. A signposter uses interval state to enforce a number of runtime assertions, the behavior of which depends on your app’s build configuration. For more information, see OSSignpostIntervalState. A signposted interval consists of one begin call and one end call only. OSSignposter also provides functionality to signpost a closure, and to emit individual signposts that don’t have a duration that you can use to highlight points of interest, such as when the user taps a button or performs a specific gesture.

## Topics

### Creating a Signposter

- [init()](os/ossignposter/init().md)
- [init(subsystem:category:)](os/ossignposter/init(subsystem:category:)-94xpb.md)
- [init(subsystem:category:)](os/ossignposter/init(subsystem:category:)-4vdri.md)
- [init(logger:)](os/ossignposter/init(logger:).md)
- [init(logHandle:)](os/ossignposter/init(loghandle:).md)
- [disabled](os/ossignposter/disabled.md)

### Getting State

- [isEnabled](os/ossignposter/isenabled.md)

### Generating Signpost IDs

- [makeSignpostID()](os/ossignposter/makesignpostid().md)
- [makeSignpostID(from:)](os/ossignposter/makesignpostid(from:).md)
- [OSSignpostID](os/ossignpostid.md)

### Starting a Signposted Interval

- [beginInterval(_:id:)](os/ossignposter/begininterval(_:id:).md)
- [beginInterval(_:id:_:)](os/ossignposter/begininterval(_:id:_:).md)
- [beginAnimationInterval(_:id:)](os/ossignposter/beginanimationinterval(_:id:).md)
- [beginAnimationInterval(_:id:_:)](os/ossignposter/beginanimationinterval(_:id:_:).md)
- [OSSignpostIntervalState](os/ossignpostintervalstate.md)
- [SignpostMetadata](os/signpostmetadata.md)

### Stopping a Signposted Interval

- [endInterval(_:_:)](os/ossignposter/endinterval(_:_:).md)
- [endInterval(_:_:_:)](os/ossignposter/endinterval(_:_:_:).md)

### Measuring a Closure

- [withIntervalSignpost(_:id:around:)](os/ossignposter/withintervalsignpost(_:id:around:).md)
- [withIntervalSignpost(_:id:_:around:)](os/ossignposter/withintervalsignpost(_:id:_:around:).md)

### Emitting Individual Signposts

- [emitEvent(_:id:)](os/ossignposter/emitevent(_:id:).md)
- [emitEvent(_:id:_:)](os/ossignposter/emitevent(_:id:_:).md)

## Relationships

### Conforms To

- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Measure Events

- [Recording Performance Data](os/recording-performance-data.md)
- [Legacy Signpost Symbols](os/legacy-signpost-symbols.md)
- [OSSignpostType](os/ossignposttype.md)
- [os_signpost_id_t](os/os_signpost_id_t.md)
