diff options
Diffstat (limited to 'bin/respondtime.sh')
| -rwxr-xr-x | bin/respondtime.sh | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/bin/respondtime.sh b/bin/respondtime.sh index de0731b..6d5b9e4 100755 --- a/bin/respondtime.sh +++ b/bin/respondtime.sh @@ -1,16 +1,27 @@ #!/bin/bash # use cURL to measure the time until the webpage loads -CURLINFOTEXT="$(dirname $0)/../resources/curlinfo.txt" +CURLINFOTEXT=" + time_namelookup: %{time_namelookup} -if [ ! -f "$CURLINFOTEXT" ]; then - echo "$(tput setaf 1)$(tput bold)Failure. $(tput sgr0)No Info Text for cURL given." 1>&2 - exit 1 -fi + time_connect: %{time_connect} + + time_appconnect: %{time_appconnect} + + time_pretransfer: %{time_pretransfer} + + time_redirect: %{time_redirect} + + time_starttransfer: %{time_starttransfer} + + ---------- + + time_total: %{time_total} +" if [ -z "$1" ]; then echo "$(tput setaf 1)$(tput bold)Failure. $(tput sgr0)Missing URL or Hostname" 1>&2 exit 1 fi -curl -w "@$CURLINFOTEXT" -o /dev/null -s "$1" +curl -w "$CURLINFOTEXT" -o /dev/null -s "$1" |
