2021-12-16 09:28:22 +00:00
|
|
|
#!/dev/null
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-12-17 09:56:52 +00:00
|
|
|
:: benchmark / server / http / 1x1 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http "${@}" --processes 1 --threads 1
|
|
|
|
:: benchmark / server / http / 2x1 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http "${@}" --processes 2 --threads 1
|
|
|
|
:: benchmark / server / http / 1x2 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http "${@}" --processes 1 --threads 2
|
|
|
|
:: benchmark / server / http / 2x2 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http "${@}" --processes 2 --threads 2
|
|
|
|
|
|
|
|
:: benchmark / server / https-fast / 1x1 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' https-fast "${@}" --processes 1 --threads 1
|
|
|
|
:: benchmark / server / https-fast / 2x1 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' https-fast "${@}" --processes 2 --threads 1
|
|
|
|
:: benchmark / server / https-fast / 1x2 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' https-fast "${@}" --processes 1 --threads 2
|
|
|
|
:: benchmark / server / https-fast / 2x2 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' https-fast "${@}" --processes 2 --threads 2
|
|
|
|
|
|
|
|
:: benchmark / server / https-go / 1x1 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' https-go "${@}" --processes 1 --threads 1
|
|
|
|
:: benchmark / server / https-go / 2x1 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' https-go "${@}" --processes 2 --threads 1
|
|
|
|
:: benchmark / server / https-go / 1x2 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' https-go "${@}" --processes 1 --threads 2
|
|
|
|
:: benchmark / server / https-go / 2x2 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' https-go "${@}" --processes 2 --threads 2
|
|
|
|
|
|
|
|
:: benchmark / server / http2-go / 1x1 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http2-go "${@}" --processes 1 --threads 1
|
|
|
|
:: benchmark / server / http2-go / 2x1 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http2-go "${@}" --processes 2 --threads 1
|
|
|
|
:: benchmark / server / http2-go / 1x2 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http2-go "${@}" --processes 1 --threads 2
|
|
|
|
:: benchmark / server / http2-go / 2x2 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http2-go "${@}" --processes 2 --threads 2
|
|
|
|
|
|
|
|
|
|
|
|
:: benchmark / wrk / http / 16384 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / http' "${@}" --threads 2 --connections 16384 --timeout 6s
|
|
|
|
:: benchmark / wrk / http / 4096 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / http' "${@}" --threads 2 --connections 4096
|
|
|
|
:: benchmark / wrk / http / 2048 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / http' "${@}" --threads 2 --connections 2048
|
|
|
|
:: benchmark / wrk / http / 1024 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / http' "${@}" --threads 2 --connections 1024
|
|
|
|
:: benchmark / wrk / http / 512 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / http' "${@}" --threads 1 --connections 512
|
|
|
|
:: benchmark / wrk / http / 256 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / http' "${@}" --threads 1 --connections 256
|
|
|
|
:: benchmark / wrk / http / 128 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / http' "${@}" --threads 1 --connections 128
|
|
|
|
:: benchmark / wrk / http / 64 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / http' "${@}" --threads 1 --connections 64
|
|
|
|
:: benchmark / wrk / http / 32 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / http' "${@}" --threads 1 --connections 32
|
|
|
|
:: benchmark / wrk / http / 16 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / http' "${@}" --threads 1 --connections 16
|
|
|
|
:: benchmark / wrk / http / 8 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / http' "${@}" --threads 1 --connections 8
|
|
|
|
:: benchmark / wrk / http / 4 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / http' "${@}" --threads 1 --connections 4
|
|
|
|
:: benchmark / wrk / http / 2 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / http' "${@}" --threads 1 --connections 2
|
|
|
|
:: benchmark / wrk / http / 1 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / http' "${@}" --threads 1 --connections 1
|
|
|
|
|
|
|
|
:: benchmark / wrk / https / 16384 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / https' "${@}" --threads 2 --connections 16384 --timeout 6s
|
|
|
|
:: benchmark / wrk / https / 4096 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / https' "${@}" --threads 2 --connections 4096
|
|
|
|
:: benchmark / wrk / https / 2048 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / https' "${@}" --threads 2 --connections 2048
|
|
|
|
:: benchmark / wrk / https / 1024 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / https' "${@}" --threads 2 --connections 1024
|
|
|
|
:: benchmark / wrk / https / 512 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / https' "${@}" --threads 1 --connections 512
|
|
|
|
:: benchmark / wrk / https / 256 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / https' "${@}" --threads 1 --connections 256
|
|
|
|
:: benchmark / wrk / https / 128 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / https' "${@}" --threads 1 --connections 128
|
|
|
|
:: benchmark / wrk / https / 64 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / https' "${@}" --threads 1 --connections 64
|
|
|
|
:: benchmark / wrk / https / 32 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / https' "${@}" --threads 1 --connections 32
|
|
|
|
:: benchmark / wrk / https / 16 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / https' "${@}" --threads 1 --connections 16
|
|
|
|
:: benchmark / wrk / https / 8 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / https' "${@}" --threads 1 --connections 8
|
|
|
|
:: benchmark / wrk / https / 4 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / https' "${@}" --threads 1 --connections 4
|
|
|
|
:: benchmark / wrk / https / 2 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / https' "${@}" --threads 1 --connections 2
|
|
|
|
:: benchmark / wrk / https / 1 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / https' "${@}" --threads 1 --connections 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--<< benchmark / server
|
|
|
|
"${ZRUN[@]}" ':: go / build / server / release / quick'
|
|
|
|
test "${#}" -ge 1
|
|
|
|
_mode="${1}"
|
|
|
|
shift -- 1
|
2021-12-16 09:28:22 +00:00
|
|
|
if test "${#}" -ge 1 ; then
|
|
|
|
if test "${1:0:1}" != '-' ; then
|
|
|
|
_archive="${1}"
|
|
|
|
shift -- 1
|
|
|
|
else
|
|
|
|
_archive=''
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
_archive=''
|
|
|
|
fi
|
|
|
|
if test -z "${_archive}" ; then
|
|
|
|
_archive=./examples/hello-world.cdb
|
|
|
|
fi
|
2021-12-17 09:56:52 +00:00
|
|
|
_arguments=()
|
|
|
|
case "${_mode}" in
|
|
|
|
( http )
|
|
|
|
_arguments+=(
|
|
|
|
--bind 127.9.185.194:8080
|
|
|
|
)
|
|
|
|
;;
|
|
|
|
( https-fast )
|
|
|
|
_arguments+=(
|
|
|
|
--bind-tls 127.9.185.194:8443
|
|
|
|
--http2-disable
|
|
|
|
)
|
|
|
|
;;
|
|
|
|
( https-go )
|
|
|
|
_arguments+=(
|
|
|
|
--bind-tls-2 127.9.185.194:8443
|
|
|
|
--http2-disable
|
|
|
|
)
|
|
|
|
;;
|
|
|
|
( http2-go )
|
|
|
|
_arguments+=(
|
|
|
|
--bind-tls-2 127.9.185.194:8443
|
|
|
|
--http1-disable
|
|
|
|
)
|
|
|
|
;;
|
|
|
|
esac
|
2021-12-16 09:28:22 +00:00
|
|
|
exec -- \
|
|
|
|
sudo -u root -n -E -P -- \
|
|
|
|
taskset -c 0,1 \
|
|
|
|
nice -n -19 -- \
|
|
|
|
ionice -c 2 -n 0 -- \
|
|
|
|
chrt -r 10 \
|
|
|
|
prlimit -n262144 -- \
|
|
|
|
sudo -u "${USER}" -n -E -P -- \
|
|
|
|
env -i -- \
|
|
|
|
./.outputs/binaries/release/kawipiko-server \
|
2021-12-17 09:56:52 +00:00
|
|
|
"${_arguments[@]}" \
|
2021-12-16 09:28:22 +00:00
|
|
|
--archive "${_archive}" \
|
|
|
|
--security-headers-disable \
|
|
|
|
--timeout-disable \
|
|
|
|
"${@}" \
|
|
|
|
#
|
|
|
|
!!
|
|
|
|
|
|
|
|
|
|
|
|
<< benchmark / server / mmap
|
|
|
|
exec -- "${ZRUN[@]}" ':: benchmark / server' \
|
|
|
|
"${@}" \
|
|
|
|
--archive-mmap \
|
|
|
|
--archive-preload \
|
|
|
|
#
|
|
|
|
!!
|
|
|
|
|
|
|
|
<< benchmark / server / inmem
|
|
|
|
exec -- "${ZRUN[@]}" ':: benchmark / server' \
|
|
|
|
"${@}" \
|
|
|
|
--archive-inmem \
|
|
|
|
--index-all \
|
|
|
|
#
|
|
|
|
!!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<< benchmark / server / profile / cpu
|
|
|
|
exec -- "${ZRUN[@]}" ':: benchmark / server / mmap' \
|
|
|
|
"${@}" \
|
|
|
|
--profile-cpu ./.outputs/server-cpu.txt \
|
|
|
|
#
|
|
|
|
!!
|
|
|
|
|
|
|
|
<< benchmark / server / profile / mem
|
|
|
|
exec -- "${ZRUN[@]}" ':: benchmark / server / mmap' \
|
|
|
|
"${@}" \
|
|
|
|
--profile-mem ./.outputs/server-mem.txt \
|
|
|
|
#
|
|
|
|
!!
|
|
|
|
|
2021-12-16 16:10:05 +00:00
|
|
|
|
2021-12-16 09:28:22 +00:00
|
|
|
<< benchmark / server / profile / cpu / analyze
|
|
|
|
export -- PPROF_BINARY_PATH=./.outputs/binaries/release/kawipiko-server
|
|
|
|
exec -- go tool pprof "${@}" -- ./.outputs/server-cpu.txt
|
|
|
|
!!
|
|
|
|
|
2021-12-16 16:10:05 +00:00
|
|
|
<< benchmark / server / profile / cpu / analyze / web
|
|
|
|
export -- PPROF_BINARY_PATH=./.outputs/binaries/release/kawipiko-server
|
|
|
|
exec -- go tool pprof -http 127.108.221.132:8080 -no_browser -functions "${@}" -- ./.outputs/server-cpu.txt
|
|
|
|
!!
|
|
|
|
|
|
|
|
|
2021-12-16 09:28:22 +00:00
|
|
|
<< benchmark / server / profile / mem / analyze
|
|
|
|
export -- PPROF_BINARY_PATH=./.outputs/binaries/release/kawipiko-server
|
2021-12-16 16:10:05 +00:00
|
|
|
exec -- go tool pprof "${@}" -- ./.outputs/server-mem.txt
|
|
|
|
!!
|
|
|
|
|
|
|
|
<< benchmark / server / profile / mem / analyze / web
|
|
|
|
export -- PPROF_BINARY_PATH=./.outputs/binaries/release/kawipiko-server
|
|
|
|
exec -- go tool pprof "${@}" -http 127.108.221.132:8080 -no_browser -functions -- ./.outputs/server-mem.txt
|
2021-12-16 09:28:22 +00:00
|
|
|
!!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-12-17 09:56:52 +00:00
|
|
|
<< benchmark / server-dummy / http
|
|
|
|
test "${#}" -eq 0
|
|
|
|
"${ZRUN[@]}" ':: go / build / server-dummy / release / quick'
|
|
|
|
exec -- \
|
|
|
|
sudo -u root -n -E -P -- \
|
|
|
|
taskset -c 0,1 \
|
|
|
|
nice -n -19 -- \
|
|
|
|
ionice -c 2 -n 0 -- \
|
|
|
|
chrt -r 10 \
|
|
|
|
prlimit -n262144 -- \
|
|
|
|
sudo -u "${USER}" -n -E -P -- \
|
|
|
|
env -i -- \
|
|
|
|
./.outputs/binaries/release/kawipiko-server-dummy \
|
|
|
|
"${@}" \
|
|
|
|
"127.9.185.194:8080" \
|
|
|
|
#
|
|
|
|
!!
|
|
|
|
|
2021-12-16 09:28:22 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-12-17 09:56:52 +00:00
|
|
|
<< benchmark / wrk / http
|
|
|
|
exec -- "${ZRUN[@]}" ':: benchmark / wrk' http 127.9.185.194:8080 "${@}"
|
|
|
|
!!
|
|
|
|
|
|
|
|
<< benchmark / wrk / https
|
|
|
|
exec -- "${ZRUN[@]}" ':: benchmark / wrk' https 127.9.185.194:8443 "${@}"
|
|
|
|
!!
|
2021-12-16 09:28:22 +00:00
|
|
|
|
2021-12-17 09:56:52 +00:00
|
|
|
--<< benchmark / wrk
|
|
|
|
test "${#}" -ge 2
|
|
|
|
_url_base="${1}://${2}"
|
|
|
|
shift -- 2
|
2021-12-16 09:28:22 +00:00
|
|
|
if test "${#}" -ge 1 ; then
|
|
|
|
if test "${1:0:1}" != '-' ; then
|
|
|
|
_path="${1}"
|
|
|
|
_path="${_path#/}"
|
|
|
|
shift -- 1
|
|
|
|
else
|
|
|
|
_path=''
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
_path=''
|
|
|
|
fi
|
|
|
|
exec -- \
|
|
|
|
sudo -u root -n -E -P -- \
|
|
|
|
taskset -c 2,3 \
|
|
|
|
nice -n -19 -- \
|
|
|
|
ionice -c 2 -n 0 -- \
|
|
|
|
chrt -r 10 \
|
|
|
|
prlimit -n262144 -- \
|
|
|
|
sudo -u "${USER}" -n -E -P -- \
|
2021-12-17 09:56:52 +00:00
|
|
|
"${ZRUN[@]}" ':: tools / wrk' \
|
2021-12-16 09:28:22 +00:00
|
|
|
"${@}" \
|
2021-12-17 09:56:52 +00:00
|
|
|
-- \
|
|
|
|
"${_url_base}/${_path}" \
|
2021-12-16 09:28:22 +00:00
|
|
|
#
|
|
|
|
!!
|
|
|
|
|
|
|
|
|
2021-12-17 09:56:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<< benchmark / wrk / with-paths / http
|
|
|
|
exec -- "${ZRUN[@]}" ':: benchmark / wrk / with-paths' http 127.9.185.194:8080 "${@}"
|
|
|
|
!!
|
|
|
|
|
|
|
|
<< benchmark / wrk / with-paths / https
|
|
|
|
exec -- "${ZRUN[@]}" ':: benchmark / wrk / with-paths' https 127.9.185.194:8443 "${@}"
|
|
|
|
!!
|
|
|
|
|
|
|
|
--<< benchmark / wrk / with-paths
|
|
|
|
test "${#}" -ge 2
|
|
|
|
_url_base="${1}://${2}"
|
|
|
|
shift -- 2
|
2021-12-16 09:28:22 +00:00
|
|
|
test "${#}" -ge 1
|
|
|
|
_paths="${1}"
|
|
|
|
shift -- 1
|
|
|
|
exec -- \
|
|
|
|
sudo -u root -n -E -P -- \
|
|
|
|
taskset -c 2,3 \
|
|
|
|
nice -n -19 -- \
|
|
|
|
ionice -c 2 -n 0 -- \
|
|
|
|
chrt -r 10 \
|
|
|
|
prlimit -n262144 -- \
|
|
|
|
sudo -u "${USER}" -n -E -P -- \
|
2021-12-17 09:56:52 +00:00
|
|
|
"${ZRUN[@]}" ':: tools / wrk' \
|
2021-12-16 09:28:22 +00:00
|
|
|
"${@}" \
|
2021-12-17 09:56:52 +00:00
|
|
|
--script ../kawipiko-examples/sources/wrk-paths-from-file.lua \
|
|
|
|
-- \
|
|
|
|
"${_url_base}" \
|
2021-12-16 09:28:22 +00:00
|
|
|
"${_paths}" \
|
|
|
|
#
|
|
|
|
!!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-12-17 09:56:52 +00:00
|
|
|
<< benchmark / nghttp / https
|
|
|
|
exec -- "${ZRUN[@]}" ':: benchmark / nghttp' https 127.9.185.194:8443 "${@}"
|
|
|
|
!!
|
|
|
|
|
|
|
|
--<< benchmark / nghttp
|
|
|
|
test "${#}" -ge 2
|
|
|
|
_url_base="${1}://${2}"
|
|
|
|
shift -- 2
|
2021-12-16 09:28:22 +00:00
|
|
|
if test "${#}" -ge 1 ; then
|
|
|
|
if test "${1:0:1}" != '-' ; then
|
|
|
|
_path="${1}"
|
|
|
|
_path="${_path#/}"
|
|
|
|
shift -- 1
|
|
|
|
else
|
|
|
|
_path=''
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
_path=''
|
|
|
|
fi
|
|
|
|
exec -- \
|
2021-12-17 09:56:52 +00:00
|
|
|
"${ZRUN[@]}" ':: tools / nghttp' \
|
|
|
|
--null-out \
|
|
|
|
--stat \
|
2021-12-16 09:28:22 +00:00
|
|
|
"${@}" \
|
|
|
|
-- \
|
2021-12-17 09:56:52 +00:00
|
|
|
"${_url_base}/${_path}" \
|
2021-12-16 09:28:22 +00:00
|
|
|
#
|
|
|
|
!!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-12-17 09:56:52 +00:00
|
|
|
<< benchmark / curl / http
|
|
|
|
exec -- "${ZRUN[@]}" ':: benchmark / curl' http 127.9.185.194:8080 --http1.1 "${@}"
|
|
|
|
!!
|
|
|
|
|
|
|
|
<< benchmark / curl / https
|
|
|
|
exec -- "${ZRUN[@]}" ':: benchmark / curl' https 127.9.185.194:8443 --http1.1 "${@}"
|
|
|
|
!!
|
|
|
|
|
|
|
|
<< benchmark / curl / http2
|
|
|
|
exec -- "${ZRUN[@]}" ':: benchmark / curl' https 127.9.185.194:8443 --http2 "${@}"
|
|
|
|
!!
|
|
|
|
|
|
|
|
<< benchmark / curl
|
|
|
|
test "${#}" -ge 2
|
|
|
|
_url_base="${1}://${2}"
|
|
|
|
shift -- 2
|
|
|
|
if test "${#}" -ge 1 ; then
|
|
|
|
if test "${1:0:1}" != '-' ; then
|
|
|
|
_path="${1}"
|
|
|
|
_path="${_path#/}"
|
|
|
|
shift -- 1
|
|
|
|
else
|
|
|
|
_path=''
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
_path=''
|
|
|
|
fi
|
2021-12-16 09:28:22 +00:00
|
|
|
exec -- \
|
2021-12-17 09:56:52 +00:00
|
|
|
"${ZRUN[@]}" ':: tools / curl' \
|
|
|
|
--compressed \
|
|
|
|
--output /dev/stdout \
|
|
|
|
--dump-header /dev/stdout \
|
2021-12-16 09:54:42 +00:00
|
|
|
"${@}" \
|
2021-12-17 09:56:52 +00:00
|
|
|
-- \
|
|
|
|
"${_url_base}/${_path}" \
|
2021-12-16 09:28:22 +00:00
|
|
|
#
|
|
|
|
!!
|
|
|
|
|