45 lines
1.3 KiB
Bash
45 lines
1.3 KiB
Bash
|
black() { echo -ne '\033[0;30m'; }
|
||
|
red() { echo -ne '\033[0;31m'; }
|
||
|
green() { echo -ne '\033[0;32m'; }
|
||
|
yellow() { echo -ne '\033[0;33m'; }
|
||
|
blue() { echo -ne '\033[0;34m'; }
|
||
|
purple() { echo -ne '\e[0;033;35m'; }
|
||
|
cyan() { echo -ne '\033[0;36m'; }
|
||
|
white() { echo -ne '\033[0;37m'; }
|
||
|
bold() { echo -ne '\033[1m'; }
|
||
|
uncolor() { echo -ne '\033[0m'; }
|
||
|
|
||
|
EIGHTYDOTS="................................................................................"
|
||
|
EIGHTYEQUALS="$(echo -n "$EIGHTYDOTS" | tr . =)"
|
||
|
EIGHTYDASHES="$(echo -n "$EIGHTYDOTS" | tr . -)"
|
||
|
|
||
|
function _time {
|
||
|
red
|
||
|
echo "$EIGHTYEQUALS"
|
||
|
yellow
|
||
|
echo -n "$EIGHTYDASHES"
|
||
|
echo -e "\r--- $@ "
|
||
|
uncolor
|
||
|
export TIMEFORMAT="%4R real %4U user %4S system"
|
||
|
time $@
|
||
|
}
|
||
|
|
||
|
blue;bold
|
||
|
echo
|
||
|
echo "starting tests of the DNS subsystems"
|
||
|
date
|
||
|
echo
|
||
|
_time dig +short @172.16.1.8 xerneas.cascade.strudelline.net
|
||
|
_time dig +short @172.16.1.9 xerneas.cascade.strudelline.net
|
||
|
_time dig +short @172.16.1.8 google.com.cascade.strudelline.net
|
||
|
_time dig +short @172.16.1.9 google.com.cascade.strudelline.net
|
||
|
_time dig +short @172.16.1.8 google.com
|
||
|
_time dig +short @172.16.1.9 google.com
|
||
|
_time dig +short @172.16.1.9 $RANDOM$RANDOM.strudelline.net
|
||
|
_time dig +short @172.16.1.1 $RANDOM$RANDOM.strudelline.net
|
||
|
|
||
|
red;echo "$EIGHTYEQUALS"
|
||
|
|
||
|
|
||
|
uncolor
|