HttpWatch的时间分析

HttpWatch的时间段捕捉详解

这是一个IE的插件,下载可以点这里。下载后解压如下图所示,一共有4个文件。HttpWatch

Professional是单独软件,可以单独使用。

关于HttpWatch的时间段捕捉详解解压后有四个文件

插件安装时,只需运行httpwatchpro.exe,通常的安装过程。然后打开浏览器,就可以看到已经安装好的插件了。

关于HttpWatch的时间段捕捉详解插件安装成功

​下面以百度为例来看TimeChart,详解捕捉到的网页的详细各个响应时间。

关于HttpWatch的时间段捕捉详解httpwatch截取百度总图
关于HttpWatch的时间段捕捉详解时间的具体项

选择任意一条捕捉到的访问步骤,来详细学习时间轴的各个项的具体含义。

关于HttpWatch的时间段捕捉详解访问网页的时间轴示例

blocked:浏览器预处理时间(例如读取本地缓存的时间)、等待网络连接成功的时间。IE对一个主机名最多(例如www.baidu.com)可以同时创建2个网络连接,对于其他的连接将进入排队等待,直到其他连接完成。一般来说Blocked时间是网页中对于图片的下载时间最有意义的一个要素。

我们这里持续的是时间0.026秒。如果本地缓存比较多,那么这个部分的时间自然占用大。​

DNS
Lookup:
是把主机名转换成IP地址的时间。在这个网页被访问的时候,一般DNS只会被解析一次。因为解析一次后,这个主机对应的IP地址将被缓存在本地。

Connect:表示连接的时间,是创建一个TCP连接到网络服务器(或代理)。如果一个安全的HTTPS连接则包含SSL的握手时间。保持有效连接,经常用来避免过频反复连接网络服务器。

Send:从HTTP请求开始发送到请求发完的时间,这个时间长短依赖于发送到服务器的数据的多少。例如,若Send时间很长,是由于用HTTP
POST上传文件所花费时间的结果。

Wait:是等待请求发送完到接收到服务器反馈的时间,相对比较准确的服务器的处理能力,但是不是绝对等于服务器响应时间。这个数值包括网络的潜在时间、服务器的应答过程时间。

例如,我们可以比对,不同网站的Wait的时间,可以相对的了解,服务器的相应时间。​

Receive:从响应的第一个字节开始,到把响应接收完为止的时间。这个时间主要依赖于文本的大小,也依赖于网络带宽和是否有使用HTTP压缩等。

 

两个汇总时间:

1)TTFB
(or Time To First
Byte) 
从开始发送请求到接收到请求的时间。​

TTFB (or Time To First Byte)
是浏览器的初始化到从服务器接收到的第一个字节的时间。这个时间段是网络的时间,主要包含了TCP连接的时间、发送请求的时间和从服务器接收到的第一个字节。

TTFB =Connect Send Wait

2)Network与网络相关的HTTP请求时间,汇总时间

Network​=TTFB Receive​

Blocked time includes any pre-processing time (such as cache lookup) and the time spent waiting for a network connection to become available. Internet Explorer will only create a maximum of two concurrent network connections per host name (i.e. www.microsoft.com) and will queue up requests until a network connection is available. Often the Blocked time is the most significant factor in the download time of images embedded in a web page.

闭塞时间,包括所有的过程之前的时间(像,cache对比)和等待网络链接的时间,IE在每个主机名(像www.microsoft.com)下最多只创建两个当前的网络连接,而且要排队等待直到这个网络链接可用,通常,闭塞时间影响网页中图片加载时间的重要因素。

Connect is the time required to create a TCP connection to the web server (or proxy). If a secure HTTPS connection is being used this time includes the SSL handshake process. Keep-Alive connections are often used to avoid the overhead of repeatedly connecting to the web server.

连接时间,是创建TCP连接到服务器或者代理服务器所花费的时间,如果一个包含SSL的安全的HTTPS连接存在,Keep-Alive链接经常被用到,以避免多次重复的连接WEB服务器。

Send is the time required to send the HTTP request message to the server and will depend on the amount of data that is sent to the server. For example, long Send times will result from uploading files using an HTTP POST

发送,是发送HTTP请求到服务器的时间,而且这个时间取决与发送请求的数据量的大小,例如,长的发送时间是由于用PSOT方式上传文件造成的。

Wait is the idle time spent waiting for a response message from the server. This value includes delays introduced due to network latency and the time required to process the request on the web server.

等待,是花费在等待服务器响应消息的空闲时间,这个值包括网络延迟和服务器处理请求的时间。

Receive is the time taken to read the response message from the server. This value will be depend on the size of the content returned, network bandwidth and whether HTTP compression was used.

接收,是花费在从服务器读取响应消息的时间。这个值可以受到请求消息内容的大小,网络带宽和是否使用了HTTP压缩。

Cache Read is the time taken to read the content from the browser cache during (Cache) or 304 responses.

缓存读取,是花费在从浏览器缓存中读取内容或者304响应的时间。

TTFB (or Time To First Byte) is the duration from the initial network request being initiated by the browser to the first byte being received from the server. It includes TCP connection time, the time to send the request and the time taken to get the first byte of the response message.

TTFB,是最初的网络请求被发起到从服务器接收到第一个字节这段时间,它包含了TCP连接时间,发送HTTP请求时间和获得响应消息第一个字节的时间。

Network is the total duration of all network related operations for an HTTP request.

Network,是所有的对一个HTTP请求的相关操作的这段时间。

原文地址:https://www.cnblogs.com/qmfsun/p/6145192.html