Understanding Temporal Metrics - 理解时间度量 -- http 生命周期
Understanding Temporal Metrics
Figure 1 shows the sequence of events for a URL session task, which correspond to the temporal metrics captured by NSURLSessionTaskTransactionMetrics
.
Figure 1 Timeline of temporal metrics for a URL session task
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 domainLookupEndDate
property is nil
, along with all metrics for aspects that occurred afterwards
This image, which I picked up from the Internet, shows where the attributes of the nsurlsession task transactionmetrics are in the process of the request.