diff --git a/.gitignore b/.gitignore index a7fa26a..f662ba8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /bind9 +/knot-dns /ldns /hickory-dns diff --git a/build_kdig.sh b/build_kdig.sh new file mode 100755 index 0000000..a7b28ca --- /dev/null +++ b/build_kdig.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +source .build.sh + +echo +echo '==> Checking deps' +which git +which autoreconf +which make +which gcc || which clang + +echo +echo '==> Cloning repo' +clone https://gitlab.nic.cz/knot/knot-dns.git knot-dns + +cd knot-dns +trap 'cd ..' EXIT +set_cflags +use_lto + +echo +echo '==> autoreconf -fi' +autoreconf -fi + +echo +echo '==> ./configure (check deps, generate config)' +./configure \ + --disable-daemon --disable-modules --disable-documentation \ + --disable-systemd --disable-dbus --disable-maxminddb --disable-quic \ + --without-module-geoip --without-module-noudp --without-module-dnsproxy \ + --without-libidn + +echo +echo '==> make' +make_maxthreads + +echo +echo '==> Done' diff --git a/main.sh b/main.sh index df2f62c..e2d6fcf 100755 --- a/main.sh +++ b/main.sh @@ -42,6 +42,7 @@ built_or_system () { } exe_dig="bind9/bin/dig/dig" +exe_kdig="knot-dns/src/kdig" exe_drill="ldns/drill/drill" exe_hr="hickory-dns/target/release/resolve" @@ -50,6 +51,7 @@ echo '==> Checking deps' which unbound which hyperfine exe_dig=$(built_or_system "$exe_dig" dig "build_dig.sh" bind-utils) +exe_kdig=$(built_or_system "$exe_kdig" kdig "build_kdig.sh" knot-utils) exe_drill=$(built_or_system "$exe_drill" drill "build_drill.sh" ldns) exe_hr=$(built_or_system "$exe_hr" resolve "build_hr.sh") @@ -64,6 +66,7 @@ sleep 2 run_bench () { hyperfine -N -w 200 \ "$exe_dig -p 2253 +short $1 $2 @127.0.0.1" \ + "$exe_kdig -p 2253 +short $1 $2 @127.0.0.1" \ "$exe_drill -p 2253 -Q $1 $2 @127.0.0.1" \ "$exe_hr -n 127.0.0.1:2253 -t $1 $2" }