日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux测试网页装载时间,使用curl测试web页面响应加载速度

發布時間:2025/3/20 linux 21 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux测试网页装载时间,使用curl测试web页面响应加载速度 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

curl -o /dev/null -s -w %{http_code}:%{http_connect}:%{content_type}:%{time_namelookup}:%{time_redirect}:%{time_pretransfer}:%{time_connect}:%{time_starttransfer}:%{time_total}:%{speed_download} linuxcache.com

使用curl測試web頁面響應加載速度的參數明細

[root@localhost tmp]# curl -V

curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.21 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2

Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp

Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz

[root@localhost tmp]# ]

The variables available at this point are:

url_effective The URL that was fetched last. This is most meaningful if you’ve told

curl to follow location: headers.

http_code The numerical response code that was found in the last retrieved

HTTP(S) or FTP(s) transfer. In 7.18.2 the alias response_code was

added to show the same info.

http_connect The numerical code that was found in the last response (from a proxy)

to a curl CONNECT request. (Added in 7.12.4)

time_total The total time, in seconds, that the full operation lasted. The time

will be displayed with millisecond resolution.

time_namelookup

The time, in seconds, it took from the start until the name resolving

was completed.

time_connect The time, in seconds, it took from the start until the TCP connect to

the remote host (or proxy) was completed.

time_appconnect

The time, in seconds, it took from the start until the SSL/SSH/etc

connect/handshake to the remote host was completed. (Added in 7.19.0)

time_pretransfer

The time, in seconds, it took from the start until the file transfer

was just about to begin. This includes all pre-transfer commands and

negotiations that are specific to the particular protocol(s) involved.

time_redirect The time, in seconds, it took for all redirection steps include name

lookup, connect, pretransfer and transfer before the final transaction

was started. time_redirect shows the complete execution time for mul-

tiple redirections. (Added in 7.12.3)

time_starttransfer

The time, in seconds, it took from the start until the first byte was

just about to be transferred. This includes time_pretransfer and also

the time the server needed to calculate the result.

size_download The total amount of bytes that were downloaded.

size_upload The total amount of bytes that were uploaded.

size_header The total amount of bytes of the downloaded headers.

size_request The total amount of bytes that were sent in the HTTP request.

speed_download The average download speed that curl measured for the complete down-

load.

speed_upload The average upload speed that curl measured for the complete upload.

content_type The Content-Type of the requested document, if there was any.

num_connects Number of new connects made in the recent transfer. (Added in 7.12.3)

num_redirects Number of redirects that were followed in the request. (Added in

7.12.3)

redirect_url When a HTTP request was made without -L to follow redirects, this

variable will show the actual URL a redirect would take you to. (Added

in 7.18.2)

ftp_entry_path The initial path libcurl ended up in when logging on to the remote FTP

server. (Added in 7.15.4)

ssl_verify_result

The result of the SSL peer certificate verification that was

requested. 0 means the verification was successful. (Added in 7.19.0)

總結

以上是生活随笔為你收集整理的linux测试网页装载时间,使用curl测试web页面响应加载速度的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。