Skip to content

Instantly share code, notes, and snippets.

@yradunchev
Last active July 16, 2022 05:46
Show Gist options
  • Save yradunchev/e0b9648a69f512be7db58656952f011b to your computer and use it in GitHub Desktop.
Save yradunchev/e0b9648a69f512be7db58656952f011b to your computer and use it in GitHub Desktop.
Get https respond times.
alias testsite="curl -L -s -w '\nTesting Website Response Time for: %{url_effective}\n
Lookup Time:\t\t%{time_namelookup}
Connect Time:\t\t%{time_connect}
AppCon Time:\t\t%{time_appconnect}
Redirect Time:\t%{time_redirect}
Pre-transfer Time:\t%{time_pretransfer}
Start-transfer Time:\t%{time_starttransfer}\n
Total Time:\t\t%{time_total}\n' -o /dev/null $1"
[rubin@reaper]$ testsite https://bgpod.link/1627
Testing Website Response Time for: https://belejkapod.wordpress.com/
Lookup Time: 0.045860
Connect Time: 0.143011
AppCon Time: 0.315984
Redirect Time: 0.240471
Pre-transfer Time: 0.316095
Start-transfer Time: 1.081793
Total Time: 1.586378
[rubin@reaper]$
Lookup time: (time_namelookup): Time in seconds, it took from the start until the name resolving was completed.
Connect time: (time_connect ): Time in seconds, it took from the start until the TCP connect to the remote host was completed.
PreXfer time: (time_pretransfer): Time, in seconds, it took from the start until the file transfer was just about to begin.
StartXfer time: (time_starttransfer): Time, in seconds, it took from the start until the first byte was just about to be transferred.
time_appconnect: (AppCon Time): Time, in seconds, it took from the start until the SSL connect/handshake to the remote host was completed.
time_redirect: (Redirect time): Time, in seconds, it took for all redirection steps including name lookup, connect and transfer before the final transaction was started. It provides the full execution time for multiple redirections.
time_total: Total time, in seconds, that the full operation lasted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment