Update benchmark.sh
This commit is contained in:
parent
0a7b4bd50d
commit
f182eb162b
@ -1,10 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
functions=(isprime-scale)
|
||||
functions=(isprime-scale isprime-scale-py isprime-scale-js hello-scale hello-scale-py hello-scale-js hello hello-js hello-py isprime isprime-js isprime-py)
|
||||
connections=(50)
|
||||
times=(1m)
|
||||
kuberhost="node1:30765"
|
||||
maxthreads=40
|
||||
maxthreads=160
|
||||
|
||||
wave_dir_up=true
|
||||
wave_connection=40
|
||||
@ -37,13 +37,14 @@ fi
|
||||
echo -e "Benchmarking functions\n"
|
||||
for function in "${functions[@]}"
|
||||
do
|
||||
function_friendly=$(echo $function | cut - -d'-' -t1)
|
||||
echo -e "Benchmarking $function\n"
|
||||
if [[ $* = *"--wave"* ]]
|
||||
then
|
||||
while [[ $wave_loop -lt $wave_loop_max ]]; do
|
||||
now=$(date '+%Y-%m-%d-%H-%M')
|
||||
echo -e "Running"
|
||||
hey -c $wave_connection -z $wave_time -m POST -o csv -host "$function.kubeless" -D "$function".body -T "application/json" http://$kuberhost/"$function" > ./"$function"."$wave_connection"."$now".wave.csv
|
||||
hey -c $wave_connection -z $wave_time -m POST -o csv -host "$function.kubeless" -D "$function_friendly".body -T "application/json" http://$kuberhost/"$function" > ./"$function"."$wave_connection"."$now".wave.csv
|
||||
echo -e "Sleeping"
|
||||
sleep $wave_time
|
||||
if [[ $wave_dir_up ]]
|
||||
@ -83,11 +84,11 @@ do
|
||||
datetime=$(date '+%Y-%m-%d-%H-%M-%S')
|
||||
echo -e "Time: $time\n"
|
||||
echo -e "wrk\n"
|
||||
wrk -t$threads -c"$connection" -d"$time" -s"$function".wrk -H"Host: $function.kubeless" -H"Content-Type:application/json" --latency http://$kuberhost/"$function" > ./"$function"."$connection"."$time"."$datetime".wrk.txt 2>&1
|
||||
wrk -t$threads -c"$connection" -d"$time" -s"$function_friendly".wrk -H"Host: $function.kubeless" -H"Content-Type:application/json" --latency http://$kuberhost/"$function" > ./"$function"."$connection"."$time"."$datetime".wrk.txt 2>&1
|
||||
echo -e "hey-summary\n"
|
||||
hey -c "$connection" -z "$time" -m POST -host "$function.kubeless" -D "$function".body -T "application/json" http://$kuberhost/"$function" > ./"$function"."$connection"."$time"."$datetime".hey.txt
|
||||
hey -c "$connection" -z "$time" -m POST -host "$function.kubeless" -D "$function_firendly".body -T "application/json" http://$kuberhost/"$function" > ./"$function"."$connection"."$time"."$datetime".hey.txt
|
||||
echo -e "hey-csv\n"
|
||||
hey -c "$connection" -z "$time" -m POST -o csv -host "$function.kubeless" -D "$function".body -T "application/json" http://$kuberhost/"$function" > ./"$function"."$connection"."$time"."$datetime".csv
|
||||
hey -c "$connection" -z "$time" -m POST -o csv -host "$function.kubeless" -D "$function_friendly".body -T "application/json" http://$kuberhost/"$function" > ./"$function"."$connection"."$time"."$datetime".csv
|
||||
echo -e "$datetime"
|
||||
done
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user