benchmark script done
This commit is contained in:
parent
4d500ef688
commit
a29c097a5c
24
functions/benchmark.sh
Normal file
24
functions/benchmark.sh
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
functions=(helloget matrix)
|
||||
|
||||
connections=(2 5 10 20 21 50 100 200 400 500 1000)
|
||||
|
||||
kuberhost=""
|
||||
|
||||
for function in "${functions[@]}"
|
||||
do
|
||||
echo -e "Benchmarking $function\n"
|
||||
for connection in "${connections[@]}"
|
||||
do
|
||||
if [[ $connection -lt 20 ]]
|
||||
then
|
||||
threads=$(($connection-1))
|
||||
else
|
||||
threads=20
|
||||
fi
|
||||
echo -e "Threads: $threads Connections $connection\n"
|
||||
wrk -t$threads -d1m -c$connection -H"Host: $function.cucc" -H"Content-Type:application/json" --latency http://$kuberhost/$function > ./$function.$connection.txt 2>&1
|
||||
hey -n 10000 -c $connection -o csv -m GET -host "$function.cucc" -T "application/json" http://$kuberhost/$function > $function.$connection.csv
|
||||
done
|
||||
done
|
Loading…
Reference in New Issue
Block a user