Update benchmark.sh

This commit is contained in:
Torma Kristóf 2019-04-03 12:17:36 +02:00 committed by GitHub
parent 05da0f9f01
commit 565a298567
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,9 +2,10 @@
functions=(hello) functions=(hello)
connections=(2 5 10 20 50 100 200 400 500 1000) connections=(2 5 10 20 50 100 200 400 500 1000)
times=(10s 30s 1m 5m 15m) times=(1m)
data=(isprime) data=(isprime)
kuberhost="node1:32764" kuberhost="node1:32764"
maxthreads=160
WRK_INSTALLED=$(which wrk) WRK_INSTALLED=$(which wrk)
if [ "$WRK_INSTALLED" = "" ] if [ "$WRK_INSTALLED" = "" ]
@ -34,11 +35,11 @@ do
echo -e "\n" echo -e "\n"
for connection in "${connections[@]}" for connection in "${connections[@]}"
do do
if [[ $connection -lt 41 ]] if [[ $connection -lt $(($maxthreads + 1)) ]]
then then
threads=$(($connection-1)) threads=$(($connection-1))
else else
threads=40 threads=$maxthreads
fi fi
echo -e "Threads: $threads Connections $connection\n" echo -e "Threads: $threads Connections $connection\n"
for time in "${times[@]}" for time in "${times[@]}"
@ -60,11 +61,11 @@ do
echo -e "\n" echo -e "\n"
for connection in "${connections[@]}" for connection in "${connections[@]}"
do do
if [[ $connection -lt 41 ]] if [[ $connection -lt $(($maxthreads + 1)) ]]
then then
threads=$(($connection-1)) threads=$(($connection-1))
else else
threads=40 threads=$maxthreads
fi fi
echo -e "Threads: $threads Connections $connection\n" echo -e "Threads: $threads Connections $connection\n"
for time in "${times[@]}" for time in "${times[@]}"