Class

URLSessionTaskMetrics

An object encapsulating the metrics for a session task.

Overview

Each URLSessionTaskMetrics object contains the taskInterval and redirectCount, as well as metrics for each request-and-response transaction made during the execution of the task.

Topics

Creating Task Metrics

init()

Creates a task metrics instance.

Accessing Task Metrics

var transactionMetrics: [URLSessionTaskTransactionMetrics]

An array of metrics for each individual request-response transaction made during the execution of the task.

class URLSessionTaskTransactionMetrics

An object encapsulating the performance metrics collected during the execution of a session task.

var taskInterval: DateInterval

The time interval between when a task is instantiated and when the task is completed.

var redirectCount: Int

The number of redirects that occurred during the execution of the task.

Relationships

Inherits From

Conforms To

See Also

Collecting Task Metrics

func urlSession(URLSession, task: URLSessionTask, didFinishCollecting: URLSessionTaskMetrics)

Tells the delegate that the session finished collecting metrics for the task.