Contents

OSSignpostID

An identifier that disambiguates signposted intervals.

Declaration

struct OSSignpostID

Mentioned in

Overview

Multiple intervals that have matching names, subsystems, and categories, and that exist in the same scope can be in-flight simultaneously. To match a pair of interval calls, you need to identify each interval with a unique signpost identifier. Use the first strategy in the list below that matches your use case:

  • If identical intervals can never overlap, use the exclusive signpost ID.

  • If you have data that uniquely identifies each instance of the measured task, create a signpost ID using the init(_:) method. The value you provide must not match that of any of the system-defined signpost IDs.

  • If you have an object that uniquely identifies a pair of interval calls, such as the object you’re measuring, create a signpost ID using the makeSignpostID(from:) method. Don’t use this method for signposts that cross process boundaries.

  • Otherwise, create a signpost ID using the makeSignpostID() method.

Topics

Getting Signpost Identifiers

Creating a Signpost Identifier

Getting an Identifier’s Raw Value

See Also

Generating Signpost IDs