[scripts] Update dummy server benchmarking.

This commit is contained in:
Ciprian Dorin Craciun 2021-12-16 11:54:42 +02:00
parent 08397f69c1
commit bf4ea4f10c
4 changed files with 65 additions and 15 deletions

View file

@ -136,7 +136,7 @@
./.bin/wrk \
--threads 1 \
--connections 1 \
--conn-reqs 1024 \
--conn-reqs 65536 \
--timeout 1s \
--duration 30s \
--progress \
@ -163,7 +163,7 @@
./.bin/wrk \
--threads 1 \
--connections 1 \
--conn-reqs 1024 \
--conn-reqs 65536 \
--timeout 1s \
--duration 30s \
--progress \
@ -206,20 +206,9 @@
<< benchmark / dummy
<< benchmark / server-dummy
test "${#}" -eq 0
_outputs="$( exec -- readlink -e -- ./.outputs )"
mkdir -p -- "${_outputs}/binaries/release"
rm -f -- "${_outputs}/binaries/release/kawipiko-server-dummy"
"${ZRUN[@]}" ':: go / tool' \
build \
-mod readonly \
-tags netgo \
-ldflags 'all=-s -extld=gcc -extldflags=-static' \
-gcflags 'all=-l=4' \
-o "${_outputs}/binaries/release/kawipiko-server-dummy" \
-- ./cmd/server-dummy.go \
#
exec -- \
sudo -u root -n -E -P -- \
taskset -c 0,1 \
@ -231,6 +220,7 @@
env -i -- \
./.outputs/binaries/release/kawipiko-server-dummy \
"${@}" \
"127.9.185.194:8080" \
#
!!

View file

@ -39,3 +39,16 @@
exec -- env -i -- ./.outputs/binaries/release/kawipiko-wrapper "${@}"
!!
<< execute / server-dummy / debug
"${ZRUN[@]}" ':: go / build / server-dummy / debug'
exec -- env -i -- ./.outputs/binaries/debug/kawipiko-server-dummy "${@}"
!!
<< execute / server-dummy / release
"${ZRUN[@]}" ':: go / build / server-dummy / release'
exec -- env -i -- ./.outputs/binaries/release/kawipiko-server-dummy "${@}"
!!

View file

@ -140,6 +140,52 @@
<< go / build / server-dummy / debug
test "${#}" -eq 0
_outputs="$( exec -- readlink -e -- ./.outputs )"
mkdir -p -- "${_outputs}/binaries/debug"
if test -e "${_outputs}/binaries/debug/kawipiko-server-dummy" ; then
rm -- "${_outputs}/binaries/debug/kawipiko-server-dummy"
fi
exec -- \
nodaemon \
nice -n 19 \
"${ZRUN[@]}" ':: go / tool' \
build \
-mod readonly \
-o "${_outputs}/binaries/debug/kawipiko-server-dummy" \
-- ./cmd/server-dummy.go \
#
!!
<< go / build / server-dummy / release
test "${#}" -eq 0
_outputs="$( exec -- readlink -e -- ./.outputs )"
mkdir -p -- "${_outputs}/binaries/release"
if test -e "${_outputs}/binaries/release/kawipiko-server-dummy" ; then
rm -- "${_outputs}/binaries/release/kawipiko-server-dummy"
fi
exec -- \
nodaemon \
nice -n 19 -- \
"${ZRUN[@]}" ':: go / tool' \
build \
-mod readonly \
-tags netgo \
-a \
-gcflags 'all=-l=4' \
-ldflags 'all=-s' \
-buildmode exe \
-trimpath \
-o "${_outputs}/binaries/release/kawipiko-server-dummy" \
-- ./cmd/server-dummy.go \
#
!!
<< go / build / all / release
test "${#}" -eq 0
_outputs="$( exec -- readlink -e -- ./.outputs )"

View file

@ -7,6 +7,7 @@
::// benchmark / ...
::// go / ...
::// documentation / ...
::// *
&& _/go.z-run