From 94e1998a97e94c62e1a7b19d5119ba2963b196f2 Mon Sep 17 00:00:00 2001 From: DarkCat09 Date: Fri, 20 Dec 2024 19:49:48 +0400 Subject: [PATCH] fix: add warmup arg to hyperfine --- main.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/main.sh b/main.sh index 0837a4e..db63ee6 100755 --- a/main.sh +++ b/main.sh @@ -60,30 +60,34 @@ unbound_pid=$! sleep 2 +bench () { + hyperfine -N -w 20 -m 100 $@ +} + echo echo '==> Benchmarks for A domain.tld.' -hyperfine -N \ +bench \ "$exe_dig -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" echo echo '==> Benchmarks for AAAA domain.tld.' -hyperfine -N \ +bench \ "$exe_dig -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" echo echo '==> Benchmarks for MX domain.tld.' -hyperfine -N \ +bench \ "$exe_dig -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" echo echo '==> Benchmarks for CNAME mail.domain.tld.' -hyperfine -N \ +bench \ "$exe_dig -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"