chrome----timing含义解释

来源:互联网 发布:怎么淘宝贷款高额 编辑:程序博客网 时间:2024/05/21 07:56

这里写图片描述

  1. Queueing
    请求文件顺序的的排序
    什么东西?
    浏览器有线程限制的,发请求也不能所有的请求同时发送,所以,队列喽。
    从添加到待处理队列
    到实际开始处理的时间间隔标示

  2. Stalled
    是浏览器得到要发出这个请求的指令到请求可以发出的等待时间,一般是代理协商、以及等待可复用的TCP连接释放的时间,不包括DNS查询、建立TCP连接等时间等

  3. DNS Lookup
    时间执行DNS查找。每个新域pagerequires DNS查找一个完整的往返。 DNS查询的时间,当本地DNS缓存没有的时候,这个时间可能是有一段长度的,但是比如你一旦在host中设置了DNS,或者第二次访问,由于浏览器的DNS缓存还在,这个时间就为0了。

  4. Initial connection
    建立TCP连接的时间,就相当于客户端从发请求开始到TCP握手结束这一段,包括DNS查询+Proxy时间+TCP握手时间。

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

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

  7. 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 0