fix: add warmup arg to hyperfine

This commit is contained in:
DarkCat09 2024-12-20 19:49:48 +04:00
parent 67161335ba
commit 94e1998a97
Signed by: DarkCat09
GPG key ID: BD3CE9B65916CD82

12
main.sh
View file

@ -60,30 +60,34 @@ unbound_pid=$!
sleep 2 sleep 2
bench () {
hyperfine -N -w 20 -m 100 $@
}
echo echo
echo '==> Benchmarks for A domain.tld.' echo '==> Benchmarks for A domain.tld.'
hyperfine -N \ bench \
"$exe_dig -p 2253 domain.tld @127.0.0.1" \ "$exe_dig -p 2253 domain.tld @127.0.0.1" \
"$exe_drill -p 2253 domain.tld @127.0.0.1" \ "$exe_drill -p 2253 domain.tld @127.0.0.1" \
"$exe_hr -n 127.0.0.1:2253 domain.tld" "$exe_hr -n 127.0.0.1:2253 domain.tld"
echo echo
echo '==> Benchmarks for AAAA domain.tld.' echo '==> Benchmarks for AAAA domain.tld.'
hyperfine -N \ bench \
"$exe_dig -p 2253 aaaa domain.tld @127.0.0.1" \ "$exe_dig -p 2253 aaaa domain.tld @127.0.0.1" \
"$exe_drill -p 2253 aaaa domain.tld @127.0.0.1" \ "$exe_drill -p 2253 aaaa domain.tld @127.0.0.1" \
"$exe_hr -n 127.0.0.1:2253 -t AAAA domain.tld" "$exe_hr -n 127.0.0.1:2253 -t AAAA domain.tld"
echo echo
echo '==> Benchmarks for MX domain.tld.' echo '==> Benchmarks for MX domain.tld.'
hyperfine -N \ bench \
"$exe_dig -p 2253 mx domain.tld @127.0.0.1" \ "$exe_dig -p 2253 mx domain.tld @127.0.0.1" \
"$exe_drill -p 2253 mx domain.tld @127.0.0.1" \ "$exe_drill -p 2253 mx domain.tld @127.0.0.1" \
"$exe_hr -n 127.0.0.1:2253 -t MX domain.tld" "$exe_hr -n 127.0.0.1:2253 -t MX domain.tld"
echo echo
echo '==> Benchmarks for CNAME mail.domain.tld.' echo '==> Benchmarks for CNAME mail.domain.tld.'
hyperfine -N \ bench \
"$exe_dig -p 2253 mail.domain.tld @127.0.0.1" \ "$exe_dig -p 2253 mail.domain.tld @127.0.0.1" \
"$exe_drill -p 2253 mail.domain.tld @127.0.0.1" \ "$exe_drill -p 2253 mail.domain.tld @127.0.0.1" \
"$exe_hr -n 127.0.0.1:2253 mail.domain.tld" "$exe_hr -n 127.0.0.1:2253 mail.domain.tld"