Chrome Timing的字段详解

 

 1.Resoure Scheduling资源调度

Queueing:请求排队时间
浏览器对同一个Host的TCP连接数量限制(Chrome最多允许6个TCP连接)。

HTTP/1.0:Conection为Close,每次HTTP请求都会重新建立和断开TCP连接。

HTTP/1.1:Conection为keep-alive,保持长连接,多个HTTP请求可以复用(单个连接在同一时刻只能处理一个请求(Pipelining可以解决这个问题,但浏览器默认关闭,本身存在弊端)),超时后没有连接主动断开(默认两个小时)。

HTTP/2.2:采用多路复用技术Multiplexing,一个TCP可以同时并发多个HTTP请求(理论无上限,浏览器一般会限制)。

2.Connection Start

Stalled 

是浏览器得到要发出这个请求的指令到请求可以发出的等待时间,一般是等待资源的时间。

Proxy negotiation

代理协商。

DNS Lookup

DNS解析时间。每个新域pagerequires DNS查找一个完整的往返。

当本地DNS缓存没有的时候,这个时间较长。一旦在host中设置了DNS,或者第二次访问,由于浏览器的DNS缓存还在,这个时间就为0,就不会显示。

Initial connection

TCP三次握手建立连接时间

3.Request/Response

Request sent 
请求第一个字节发出前到最后一个字节发出后的时间,也就是上传时间。

Waiting(TTFB) 
请求发出后,到收到响应的第一个字节所花费的时间(Time To First Byte),发送请求完毕到接收请求开始的时间;这个时间段就代表服务器处理和返回数据网络延时时间了。服务器优化的目的就是要让这个时间段尽可能短。

Content Download 
收到响应的第一个字节,到接受完最后一个字节的时间,就是下载时间

官方解释
(免于大家翻墙了)
先说请求的生命周期:
The primary phases of the request lifecycle are:

Redirect 
Immediately begins startTime. 
If a redirect is happening, redirectStart begins as well. 
If a redirect is occurring at the end of this phase then redirectEnd will be taken.
App Cache 
If it’s application cache fulfilling the request, a fetchStart time will be taken.
DNS 
domainLookupStart time is taken at the beginning of the DNS request. 
domainLookupEnd time is taken at the end of the DNS request.
TCP 
connectStart is taken when initially connecting to the server. 
If TLS or SSL are in use then secureConnectionStart will start when the handshake begins for securing the connection. 
connectEnd is taken when the connection to the server is complete.
Request 
requestStart is taken once the request for a resource has been sent to the server.
Response 
responseStart is the time when the server initially responds to the request. 
responseEnd is the time when the request ends and the data is retrieved.


然后在理解那张timing图
Queuing 
A request being queued indicates that: 
The request was postponed by the rendering engine because it’s considered lower priority than critical resources (such as scripts/styles). This often happens with images. 
The request was put on hold to wait for an unavailable TCP socket that’s about to free up. 
The request was put on hold because the browser only allows six TCP connections per origin on HTTP 1. 
Time spent making disk cache entries (typically very quick.)

Stalled/Blocking 
Time the request spent waiting before it could be sent. It can be waiting for any of the reasons described for Queueing. Additionally, this time is inclusive of any time spent in proxy negotiation. 
Proxy Negotiation 
Time spent negotiating with a proxy server connection.
DNS Lookup 
Time spent performing the DNS lookup. Every new domain on a page requires a full roundtrip to do the DNS lookup. 
Initial Connection / Connecting 
Time it took to establish a connection, including TCP handshakes/retries and negotiating a SSL.
SSL 
Time spent completing a SSL handshake. 
Request Sent / Sending 
Time spent issuing the network request. Typically a fraction of a millisecond.
Waiting (TTFB) 
Time spent waiting for the initial response, also known as the Time To First Byte. This time captures the latency of a round trip to the server in addition to the time spent waiting for the server to deliver the response. 
Content Download / Downloading 
Time spent receiving the response data.
 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值