CURL – test for website response

command line:

for i in `seq 1 10`;do curl -s -w '\nLookup time:\t%{time_namelookup}\nConnect time:\t%{time_connect}\nPreXfer time:\t%{time_pretransfer}\nStartXfer time:\t%{time_starttransfer}\n\nTotal time:\t%{time_total}\n' -o /dev/null http://www.google.com;done;

Lookup time: 0.009
Connect time: 0.036
PreXfer time: 0.036
StartXfer time: 0.115

Total time: 0.143

Lookup time: 0.010
Connect time: 0.037
PreXfer time: 0.037
StartXfer time: 0.117

Total time: 0.145

Lookup time: 0.012
Connect time: 0.040
PreXfer time: 0.040
StartXfer time: 0.127

Total time: 0.155

Lookup time: 0.008
Connect time: 0.035
PreXfer time: 0.035
StartXfer time: 0.119

Total time: 0.147

Lookup time: 0.008
Connect time: 0.035
PreXfer time: 0.035
StartXfer time: 0.111

Total time: 0.139

Lookup time: 0.009
Connect time: 0.036
PreXfer time: 0.036
StartXfer time: 0.119

Total time: 0.147

Lookup time: 0.008
Connect time: 0.036
PreXfer time: 0.036
StartXfer time: 0.118

Total time: 0.147

Lookup time: 0.009
Connect time: 0.035
PreXfer time: 0.036
StartXfer time: 0.116

Total time: 0.143

Lookup time: 0.009
Connect time: 0.037
PreXfer time: 0.037
StartXfer time: 0.115

Total time: 0.145

Lookup time: 0.060
Connect time: 0.135
PreXfer time: 0.135
StartXfer time: 0.215

Total time: 0.244

 

Option Description
-s Quiet mode. Don’t show progress meter or error messages
-w Defines what to display on stdout after a completed and successful operation
-o Write output to ‘/dev/null’
time_total The total time, in seconds, that the full operation lasted
Option Description
Lookup time (time_namelookup) The time, in seconds, it took from the start until the name resolving was completed
Connect time (time_connect) The time, in seconds, it took from the start until the TCP connect to the remote host was completed
PreXfer time (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
StartXfer time (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
AppCon time (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)
Redirect time (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 multiple redirections. (Added in 7.12.3)

Leave a Reply

Your email address will not be published. Required fields are marked *

Categories

Best Buy Co, Inc.
Best Buy Co, Inc.
Best Buy Co, Inc.