From aea6024d1bf3d3d42a6778de12d730adf4de114b Mon Sep 17 00:00:00 2001 From: Horus3 Date: Wed, 25 Nov 2015 18:41:06 +0100 Subject: Rename checkswap -> swap. Inline resources in respondtime.sh. --- bin/respondtime.sh | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'bin/respondtime.sh') 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" -- cgit v1.2.3