Last active
November 12, 2020 09:11
-
-
Save chrisiona/fe09d04eb652d2b54a0e to your computer and use it in GitHub Desktop.
TTFB – Bash script that returns interesting information about a HTTP/S call
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Returns interesting information about a HTTP/S call | |
# http://chrisiona.com/post/125309997618/ttfb-a-bash-script-that-returns-interesting | |
curl -so /dev/null \ | |
-w "Response Code: \t\t%{http_code} \ | |
\nName Resolution: \t%{time_namelookup} sec\ | |
\nConnect Time: \t\t%{time_connect} sec\ | |
\nPre Transfer: \t\t%{time_pretransfer} sec\ | |
\nStart Transfer: \t%{time_starttransfer} sec\ | |
\nTotal: \t\t\t%{time_total} sec\ | |
\nSpeed Download: \t%{speed_download} bytes/sec \ | |
\nSize: \t\t\t%{size_download} bytes \ | |
\n\n" \ | |
$1 |
Author
chrisiona
commented
Jul 29, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment