Contents

intervalEntries

The interval entries in this metric report, including the full-day aggregate.

Declaration

let intervalEntries: [MetricReport.IntervalEntry]

Mentioned in

Discussion

Use the fullDayEntry convenience property on the collection to access the entry covering the entire 24-hour reporting period. This is the entry with the longest duration:

let entry = report.intervalEntries.fullDayEntry
for result in entry.values {
    switch result {
    case .cpuTime(let metric): process(metric)
    @unknown default: break
    }
}

When state reporting is enabled, intervalEntries may also include shorter sub-interval entries alongside the full-day entry. Use byStateReportingDomain on the collection to group all states across all interval entries by domain.

See Also

Metric data