A DataTransferReport contains performance information about data
transferred on an NWConnection for certain span of time. Multiple reports
can be retrieved from a single connection, starting and ending at different times.
This allows throughput to be measured based on how an application is using
a connection. A report may be created prior to a connection moving into
the .ready state, but measurements will not be collected until after the
connection is ready.
Members (4)
get · iOS 13.0+
aggregatePathReport
TypeScript
get aggregatePathReport(): NWConnection_DataTransferReport_PathReport
Swift declaration
let aggregatePathReport: NWConnection.DataTransferReport.PathReport
A report of path values that aggregates counters across
the paths used, if there are multiple paths. If there is
only one path, this will contains the values for that path.
Values that can be summed are summed across paths. For values
that cannot sum, the value of the primary path is used.
get · iOS 13.0+
pathReports
TypeScript
get pathReports(): Array<NWConnection_DataTransferReport_PathReport>
Swift declaration
let pathReports: [NWConnection.DataTransferReport.PathReport]
One or more reports for paths used by the connection.
Connections that are not multipath capable will only
generate one path report.
get · iOS 13.0+
debugDescription
TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }
A textual representation of this instance, suitable for debugging.
Calling this property directly is discouraged. Instead, convert an
instance of any type to a string by using the `String(reflecting:)`
initializer. This initializer works with any type, and uses the custom
`debugDescription` property for types that conform to
`CustomDebugStringConvertible`:
struct Point: CustomDebugStringConvertible {
let x: Int, y: Int
var debugDescription: String {
return "(\(x), \(y))"
}
}
let p = Point(x: 21, y: 30)
let s = String(reflecting: p)
print(s)
// Prints "(21, 30)"
The conversion of `p` to a string in the assignment to `s` uses the
`Point` type's `debugDescription` property.
get · iOS 13.0+
duration
TypeScript
get duration(): number
Swift declaration
let duration: TimeInterval
Length of time in seconds over which the report collected
information. This can be used to calculate throughput for
application and transport bytes counts.