An object encapsulating the performance metrics collected during the execution of a session task.
- iOS 10.0+
- macOS 10.12+
- Mac Catalyst 13.0+
- tvOS 10.0+
- watchOS 3.0+
URLSession object consists of a
response property, corresponding to the request and response of the corresponding task. It also contains temporal metrics, starting with
fetch and ending with
response, as well as other characteristics like
Understanding Temporal Metrics
Figure 1 shows the sequence of events for a URL session task, which correspond to the temporal metrics captured by
For all metrics with a start and end date, if an aspect of the task was not completed, then its corresponding end date metric is
nil. This can happen if name lookup begins, but the operation either times out, fails, or the client cancels the task before the name can be resolved. In this case, the
domain property is
nil, along with all metrics for aspects that occurred afterwards.