summaryrefslogtreecommitdiff
path: root/bin/respondtime.sh
diff options
context:
space:
mode:
authorHorus32015-11-25 18:41:06 +0100
committerHorus32015-11-25 18:41:06 +0100
commitaea6024d1bf3d3d42a6778de12d730adf4de114b (patch)
tree7e97daa4d45b5edf1068c149ccbd1d3f0cb3956b /bin/respondtime.sh
parent4a5a08dcc6cf209203efccad9cc2714beb9fdb50 (diff)
downloaddotfiles-aea6024d1bf3d3d42a6778de12d730adf4de114b.tar.gz
Rename checkswap -> swap. Inline resources in respondtime.sh.
Diffstat (limited to 'bin/respondtime.sh')
-rwxr-xr-xbin/respondtime.sh23
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"