Update benchmark.sh

This commit is contained in:
Torma Kristóf 2019-04-03 12:49:20 +02:00 committed by GitHub
parent cbefb28c57
commit f8b9c8bfd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,14 +1,15 @@
#!/bin/bash #!/bin/bash
functions=(hello) functions=(hello)
connections=(2 5 10 20 50 100 200 400 500 1000) # 5 10 20 50 100 200 400 500 1000
connections=(2)
times=(1m) times=(1m)
data=(isprime) data=(isprime)
kuberhost="node1:32764" kuberhost="node1:32764"
maxthreads=160 maxthreads=160
wrk_options="-t$threads -d$time -c$connection -H\"Host: $function.kubeless\" -H\"Content-Type:application/json\" --latency http://$kuberhost/$function" wrk_options=(-t$threads -d$time -c$connection -H"Host: $function.kubeless" -H"Content-Type:application/json" --latency http://$kuberhost/$function)
wrk_output=$function.$connection.$time.txt wrk_output=$function.$connection.$time.txt
hey_options="-c $connection -z $time -o csv -m POST -host \"$function.kubeless\" -T \"application/json\" http://$kuberhost/$function" hey_options=(-c $connection -z $time -o csv -m POST -host "$function.kubeless" -T "application/json" http://$kuberhost/$function)
hey_output=$function.$connection.$time.csv hey_output=$function.$connection.$time.csv
array_contains () { array_contains () {
@ -67,8 +68,8 @@ do
for time in "${times[@]}" for time in "${times[@]}"
do do
echo -e "Time: $time\n" echo -e "Time: $time\n"
wrk $wrk_options $wrk_additional_options > $wrk_output 2>&1 wrk "${wrk_options[@]}" $wrk_additional_options > $wrk_output 2>&1
hey $hey_options $hey_additional_options > $hey_output hey "${hey_options[@]}" $hey_additional_options > $hey_output
done done
done done
done done