Class

MXSignpostMetric

An object representing a custom metric.

Declaration

class MXSignpostMetric : MXMetric

Overview

A custom metric is an event type with a developer-defined name and category. You can add custom metrics to daily reports to capture information specific to your app.

Custom metrics are a type of signpost saved to custom OS logs created using makeLogHandle(category:). The daily report contains information about the number and duration of custom events, as well as the power and performance impact of those events. Only custom metric events logged using MetricKit utility functions capture additional power and performance data.

Topics

Logging Custom Metrics

func mxSignpost(OSSignpostType, dso: UnsafeRawPointer, log: OSLog, name: StaticString, signpostID: OSSignpostID, StaticString, [CVarArg])

Post a single custom metric, the start time of a custom metric, or the end time of a custom metric to metric kit log.

Reading Custom Metric Data

var signpostIntervalData: MXSignpostIntervalData?

The data captured for a custom metric.

class MXSignpostIntervalData

A data object representing the captured data for a custom metric.

Reading Data About the Custom Metric

var signpostName: String

The developer-specified name of the custom metric represented by the object.

var signpostCategory: String

The developer-specified category of the custom metric represented by the object.

var totalCount: Int

The total number of occurrences of the captured custom metric.

Relationships

Inherits From

Conforms To

See Also

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software