Timeline
public struct Timeline
Responsible for computing the timing metrics for the complete lifecycle of a Request
.
-
The time the request was initialized.
Declaration
Swift
public let requestStartTime: CFAbsoluteTime
-
The time the first bytes were received from or sent to the server.
Declaration
Swift
public let initialResponseTime: CFAbsoluteTime
-
The time when the request was completed.
Declaration
Swift
public let requestCompletedTime: CFAbsoluteTime
-
The time when the response serialization was completed.
Declaration
Swift
public let serializationCompletedTime: CFAbsoluteTime
-
The time interval in seconds from the time the request started to the initial response from the server.
Declaration
Swift
public let latency: TimeInterval
-
The time interval in seconds from the time the request started to the time the request completed.
Declaration
Swift
public let requestDuration: TimeInterval
-
The time interval in seconds from the time the request completed to the time response serialization completed.
Declaration
Swift
public let serializationDuration: TimeInterval
-
The time interval in seconds from the time the request started to the time response serialization completed.
Declaration
Swift
public let totalDuration: TimeInterval
-
Creates a new
Timeline
instance with the specified request times.Declaration
Swift
public init( requestStartTime: CFAbsoluteTime = 0.0, initialResponseTime: CFAbsoluteTime = 0.0, requestCompletedTime: CFAbsoluteTime = 0.0, serializationCompletedTime: CFAbsoluteTime = 0.0)
-
The textual representation used when written to an output stream, which includes the latency, the request duration and the total duration.
Declaration
Swift
public var description: String
-
The textual representation used when written to an output stream, which includes the request start time, the initial response time, the request completed time, the serialization completed time, the latency, the request duration and the total duration.
Declaration
Swift
public var debugDescription: String