Created
August 23, 2013 06:11
-
-
Save kei2100/6316029 to your computer and use it in GitHub Desktop.
curl response time test
This file contains hidden or 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 | |
| set -e | |
| URL=${1} | |
| while : ;do | |
| DATE_OUT=`date +"%Y/%m/%d-%k:%M:%S"` | |
| CURL_OUT=`curl -w 'http_code\t%{http_code}\ttotal\t%{time_total}\tconnect\t%{time_connect}\tstarttransfer\t%{time_starttransfer}\n' "${URL}" -s -o /dev/null` | |
| echo -e "${DATE_OUT}\t${CURL_OUT}" | |
| sleep ${2} | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment