在對系統監控的過程中,發現ClientConnected和ClientBeginRequest之間有超過10秒的間隔時間的情況發生。
例如:
ClientConnected: 09:50:31.066
ClientBeginRequest: 09:50:41.113
查了http://fiddler.wikidot.com/timers,看到了對這種現象的說明
- ClientConnected- Exact time that the client browser made a TCP/IP connection to Fiddler.
- ClientBeginRequest– Time at which this HTTP request began. May be much later than ClientConnected due to client connection reuse.
補充查了下資料:
1.很有可能是客戶端的請求是通過重用的客戶端socket來傳輸的;
2. ClientConnected是指從瀏覽器到Fiddler的socket連接時間
3. 計算準確的響應時間:ClientBeginRequest ~ ClientEndResponse
1. Fiddler作爲系統代理,所有來自微軟互聯網服務(WinInet)的http請求都先經過Fiddler再到Web Server
Internet Explorer <--> WinInet <--> Fiddler <--> Web Server
2. Fiddler可以做性能測試,HTTP統計視圖
3. 如果一個響應沒有包含Cache-Control頭,那麼就不會被緩存在客戶端
- ClientDoneRequest -瀏覽器完成將HTTP請求發送到Fiddler的時間。
- DNSTime - # milliseconds Fiddler spent in DNS looking up the server's IP address.
- GatewayDeterminationTime - # milliseconds Fiddler spent determining the upstream gateway proxy to use (e.g. processing autoproxy script). Mutually exclusive to DNSTime.
- TCPConnectTime - # milliseconds Fiddler與服務器建立TCP/IP連接的用時
- HTTPSHandshakeTime – Amount of time spent in HTTPS handshake
- ServerConnected – 與服務器建立連接的時間,由於服務器連接的重用,該時間可能比ClientConnected早。
- FiddlerBeginRequest – The time at which Fiddler began sending the HTTP request to the server.
- ServerGotRequest - Exact time that Fiddler finished (re)sending the HTTP request to the server.
- ServerBeginResponse - Exact time that Fiddler got the first bytes of the server's HTTP response.
- ServerDoneResponse - Exact time that Fiddler got the last bytes of the server's HTTP response.
- ClientBeginResponse - 開始向客戶瀏覽器返回HTTP響應數據的時間.
- ClientDoneResponse- 完成向客戶瀏覽器返回HTTP響應數據的時間.
服務器端處理及響應的時間:ServerBeginResponse - ServerGotRequest
網絡傳輸耗時(上傳):(ServerGotRequest - ClientDoneRequest) - (DNSTime + TCPConnectTime)