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 taskDiagram showing the temporal metrics for a URL session task. When a task starts, it performs a DNS lookup and then starts a connection. If the connection is encrypted, the user agent starts a TLS security handshake to secure the connection. After the connection to the server is established, the user agent requests the specified resource, and receives a response.

 

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.

 

posted @ 2021-08-25 19:43  zzfx  阅读(68)  评论(0编辑  收藏  举报