2

https耗时分析

 2 years ago
source link: https://www.felix021.com/blog/read.php?2231=
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

So far so good

简单记一下:
$ cat curl-format.txt
time_namelookup:      %{time_namelookup}\n
time_connect:        %{time_connect}\n
  time_appconnect:    %{time_appconnect}\n
  time_pretransfer:  %{time_pretransfer}\n
  time_starttransfer: %{time_starttransfer}\n

$ curl -w '@curl-format.txt' -o /dev/null -s -L "https://www.baidu.com"
time_namelookup:      0.004
time_connect:        0.018
  time_appconnect:    0.050
  time_pretransfer:  0.050
  time_starttransfer: 0.065
或者
$ go get github.com/davecheney/httpstat

$ httpstat https://www.baidu.com
...

DNS Lookup  TCP Connection  TLS Handshake  Server Processing  Content Transfer
[      0ms  |          9ms  |        105ms  |            10ms  |            0ms  ]
            |                |              |                  |                  |
  namelookup:0ms            |              |                  |                  |
                      connect:10ms          |                  |                  |
                                  pretransfer:116ms            |                  |
                                                    starttransfer:126ms            |
                                                                                total:126ms 

欢迎扫码关注:

weixin1.png

转载请注明出自 https://www.felix021.com/blog/read.php?2231 ,如是转载文则注明原出处,谢谢:)
RSS订阅地址: https://www.felix021.com/blog/feed.php

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK