Skip to content

Instantly share code, notes, and snippets.

@kei2100
Created August 23, 2013 06:11
Show Gist options
  • Save kei2100/6316029 to your computer and use it in GitHub Desktop.
Save kei2100/6316029 to your computer and use it in GitHub Desktop.
curl response time test
#!/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