Update benchmark.sh

This commit is contained in:
Torma Kristóf 2019-04-02 23:27:08 +02:00 committed by GitHub
parent 06be30352a
commit b477d420a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,6 +4,8 @@ functions=(hello matrix)
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 1h)
kuberhost="node1:32764" kuberhost="node1:32764"
WRK_INSTALLED=$(which wrk) WRK_INSTALLED=$(which wrk)
if [ "$WRK_INSTALLED" = "" ] if [ "$WRK_INSTALLED" = "" ]
@ -39,7 +41,10 @@ do
threads=40 threads=40
fi fi
echo -e "Threads: $threads Connections $connection\n" echo -e "Threads: $threads Connections $connection\n"
wrk -t$threads -d1m -c$connection -H"Host: $function.kubeless" -H"Content-Type:application/json" --latency http://$kuberhost/$function > ./$function.$connection.txt 2>&1 for time in "${times[@]}"
hey -n 100000000 -c $connection -o csv -m GET -host "$function.kubeless" -T "application/json" http://$kuberhost/$function > $function.$connection.csv do
wrk -t$threads -d$time -c$connection -H"Host: $function.kubeless" -H"Content-Type:application/json" --latency http://$kuberhost/$function > ./$function.$connection.txt 2>&1
done
hey -n 100000000 -c $connection -o csv -m GET -host "$function.kubeless" -T "application/json" http://$kuberhost/$function > $function.$connection.csv
done done
done done