loadtest all the things
This commit is contained in:
parent
0282b61ab4
commit
350f077ca4
@ -9,6 +9,8 @@ connections=(45)
|
||||
times=(30s)
|
||||
kuberhost="node1:31299"
|
||||
maxthreads=40
|
||||
kubeless=true
|
||||
rps=500
|
||||
#Wave mode configuration
|
||||
wave_connection=40
|
||||
wave_max_conn=160
|
||||
@ -16,11 +18,8 @@ wave_min_conn=40
|
||||
wave_time="30s"
|
||||
wave_loop_max=2
|
||||
#Climb mode configuration
|
||||
climb_max=300
|
||||
climb_connection=30
|
||||
kubeless=true
|
||||
#Loadtest specific fonguration
|
||||
loadtest_rps=1000
|
||||
climb_max=10
|
||||
climb=1
|
||||
|
||||
HEY_INSTALLED=$(command -v hey)
|
||||
if [[ $HEY_INSTALLED = "" ]]
|
||||
@ -64,9 +63,9 @@ do
|
||||
echo -e "Running"
|
||||
if $kubeless;
|
||||
then
|
||||
hey -c $wave_connection -z $wave_time -m POST -o csv -host "$function.kubeless" -D "$function_friendly".body -T "application/json" http://$kuberhost/"$function" > ./data/"$function"."$wave_num".wave.csv
|
||||
hey -c $wave_connection -q $rps -z $wave_time -m POST -o csv -host "$function.kubeless" -D "$function_friendly".body -T "application/json" http://$kuberhost/"$function" > ./data/"$function"."$wave_num".wave.csv
|
||||
else
|
||||
hey -c $wave_connection -z $wave_time -m POST -o csv -host "$function.default.example.com" http://$kuberhost/ > ./data/"$function"."$wave_num".wave.csv
|
||||
hey -c $wave_connection -q $rps -z $wave_time -m POST -o csv -host "$function.default.example.com" http://$kuberhost/ > ./data/"$function"."$wave_num".wave.csv
|
||||
fi
|
||||
wave_num=$((wave_num + 1))
|
||||
if $wave_dir_up
|
||||
@ -112,16 +111,16 @@ do
|
||||
then
|
||||
if [[ $* = *"--loadtest"* ]]
|
||||
then
|
||||
loadtest -H "Host: $function.kubeless" --rps $leadtest_rps -c $connection -t $time -p "$function_firendly".body http://$kuberhost/"$function" > ./data/"$function"."$connection"."$time"."$datetime".txt
|
||||
loadtest -H "Host: $function.kubeless" --rps $rps -c $connection -t $time -p "$function_firendly".body http://$kuberhost/"$function" > ./data/"$function"."$connection"."$time"."$datetime".txt
|
||||
else
|
||||
hey -c "$connection" -z "$time" -m POST -host "$function.kubeless" -D "$function_firendly".body -T "application/json" http://$kuberhost/"$function" > ./data/"$function"."$connection"."$time"."$datetime".txt
|
||||
hey -c "$connection" -q $rps -z "$time" -m POST -host "$function.kubeless" -D "$function_firendly".body -T "application/json" http://$kuberhost/"$function" > ./data/"$function"."$connection"."$time"."$datetime".txt
|
||||
fi
|
||||
else
|
||||
if [[ $* = *"--loadtest"* ]]
|
||||
then
|
||||
loadtest -H "Host: $function.default.example.com" --rps $leadtest_rps -c $connection -t $time http://$kuberhost/ > ./data/"$function"."$connection"."$time"."$datetime".txt
|
||||
loadtest -H "Host: $function.default.example.com" --rps $rps -c $connection -t $time http://$kuberhost/ > ./data/"$function"."$connection"."$time"."$datetime".txt
|
||||
else
|
||||
hey -c "$connection" -z "$time" -m POST -host "$function.default.example.com" http://$kuberhost/ > ./data/"$function"."$connection"."$time"."$datetime".txt
|
||||
hey -c "$connection" -q $rps -z "$time" -m POST -host "$function.default.example.com" http://$kuberhost/ > ./data/"$function"."$connection"."$time"."$datetime".txt
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@ -142,9 +141,19 @@ do
|
||||
echo -e "hey-for $num\n"
|
||||
if $kubeless;
|
||||
then
|
||||
hey -c "$connection" -z "$time" -m POST -o csv -host "$function.kubeless" -D "$function_friendly".body -T "application/json" http://$kuberhost/"$function" > ./data/"$function"."$num".csv
|
||||
if [[ $* = *"--loadtest"* ]]
|
||||
then
|
||||
loadtest -H "Host: $function.kubeless" --rps $rps -c $connection -t $time -p "$function_firendly".body http://$kuberhost/"$function" > ./data/"$function"."$num".txt
|
||||
else
|
||||
hey -c "$connection" -z "$time" -m POST -o csv -host "$function.default.example.com" http://$kuberhost/ > ./data/"$function"."$num".for.csv
|
||||
hey -c "$connection" -q $rps -z "$time" -m POST -o csv -host "$function.kubeless" -D "$function_friendly".body -T "application/json" http://$kuberhost/"$function" > ./data/"$function"."$num".csv
|
||||
fi
|
||||
else
|
||||
if [[ $* = *"--loadtest"* ]]
|
||||
then
|
||||
loadtest -H "Host: $function.default.example.com" --rps $rps -c $connection -t $time http://$kuberhost/ > ./data/"$function"."$num".for.csv
|
||||
else
|
||||
hey -c "$connection" -q $rps -z "$time" -m POST -o csv -host "$function.default.example.com" http://$kuberhost/ > ./data/"$function"."$num".for.csv
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
@ -153,15 +162,26 @@ do
|
||||
fi
|
||||
if [[ $* = *"--climb"* ]]
|
||||
then
|
||||
while [[ $climb_connection -lt $climb_max ]]; do
|
||||
while [[ $climb -lt $climb_max ]]; do
|
||||
climb_rps=$((rps * climb))
|
||||
echo -e "Connections: $climb_connection"
|
||||
if $kubeless;
|
||||
then
|
||||
hey -c $climb_connection -z $time -m POST -o csv -host "$function.kubeless" -D "$function_friendly".body -T "application/json" http://$kuberhost/"$function" > ./data/"$function"."$climb_connection".climb.csv
|
||||
if [[ $* = *"--loadtest"* ]]
|
||||
then
|
||||
loadtest -H "Host: $function.kubeless" --rps $climb_rps -c 1 -t $time -p "$function_firendly".body http://$kuberhost/"$function" > ./data/"$function"."$climb_connection".climb.txt
|
||||
else
|
||||
hey -c $climb_connection -z $time -m POST -o csv -host "$function.default.example.com" http://$kuberhost/ > ./data/"$function"."$climb_connection".climb.csv
|
||||
hey -c 1 -q $climb_rps -z $time -m POST -o csv -host "$function.kubeless" -D "$function_friendly".body -T "application/json" http://$kuberhost/"$function" > ./data/"$function"."$climb_connection".climb.csv
|
||||
fi
|
||||
climb_connection=$((climb_connection + 10))
|
||||
else
|
||||
if [[ $* = *"--loadtest"* ]]
|
||||
then
|
||||
loadtest -H "Host: $function.default.example.com" --rps $climb_rps -c 1 -t $time http://$kuberhost/ > ./data/"$function"."$climb_connection".climb.txt
|
||||
else
|
||||
hey -c 1 -q $climb_rps -z $time -m POST -o csv -host "$function.default.example.com" http://$kuberhost/ > ./data/"$function"."$climb_connection".climb.csv
|
||||
fi
|
||||
fi
|
||||
climb=$((climb + 1))
|
||||
done
|
||||
fi
|
||||
echo -e "Finished at $datetime"
|
||||
|
Loading…
Reference in New Issue
Block a user