371 shaares
1 result
tagged
webapp
Good breakdown of printing timing breakdown of curl. For example command:
curl -L --output /dev/null --silent --show-error --write-out 'lookup: %{time_namelookup}\nconnect: %{time_connect}\nappconnect: %{time_appconnect}\npretransfer: %{time_pretransfer}\nredirect: %{time_redirect}\nstarttransfer: %{time_starttransfer}\ntotal: %{time_total}\n' 'https://google.com'
lookup: 0.038
connect: 0.063
appconnect: 0.177
pretransfer: 0.178
redirect: 0.225
starttransfer: 0.679
total: 0.929
From the man pages -
lookup: The time, in seconds, it took from the start until the name resolving was completed.
connect: The time, in seconds, it took from the start until the TCP connect to the remote host (or proxy) was completed.
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)
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.
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)
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.
total: The total time, in seconds, that the full operation lasted. The time will be displayed with millisecond resolution.
curl -L --output /dev/null --silent --show-error --write-out 'lookup: %{time_namelookup}\nconnect: %{time_connect}\nappconnect: %{time_appconnect}\npretransfer: %{time_pretransfer}\nredirect: %{time_redirect}\nstarttransfer: %{time_starttransfer}\ntotal: %{time_total}\n' 'https://google.com'
lookup: 0.038
connect: 0.063
appconnect: 0.177
pretransfer: 0.178
redirect: 0.225
starttransfer: 0.679
total: 0.929
From the man pages -
lookup: The time, in seconds, it took from the start until the name resolving was completed.
connect: The time, in seconds, it took from the start until the TCP connect to the remote host (or proxy) was completed.
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)
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.
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)
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.
total: The total time, in seconds, that the full operation lasted. The time will be displayed with millisecond resolution.