Update benchmark.sh
This commit is contained in:
parent
c243005254
commit
0cf404a6b2
@ -7,9 +7,9 @@ times=(1m)
|
||||
data=(isprime)
|
||||
kuberhost="node1:32764"
|
||||
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 $(array_contains data function && "-s$function.wrk") -H"Host: $function.kubeless" -H"Content-Type:application/json" --latency http://$kuberhost/$function)
|
||||
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" $(array_contains data function && "-D $function.body") -T "application/json" http://$kuberhost/$function)
|
||||
hey_output=$function.$connection.$time.csv
|
||||
|
||||
array_contains () {
|
||||
@ -54,8 +54,6 @@ do
|
||||
curl_additional_options=$(array_contains data function && "--data-binary \"@$function.body\"")
|
||||
curl $curl_additional_options --header "Host: $function.kubeless" --header "Content-Type:application/json" http://$kuberhost/$function
|
||||
echo -e "\n"
|
||||
wrk_additional_options=$(array_contains data function && "-s$function.wrk")
|
||||
hey_additional_options=$(array_contains data function && "-D $function.body")
|
||||
for connection in "${connections[@]}"
|
||||
do
|
||||
if [[ $connection -lt $(($maxthreads + 1)) ]]
|
||||
@ -68,8 +66,8 @@ do
|
||||
for time in "${times[@]}"
|
||||
do
|
||||
echo -e "Time: $time\n"
|
||||
wrk "${wrk_options[@]}" $wrk_additional_options > "${$wrk_output}" 2>&1
|
||||
hey "${hey_options[@]}" $hey_additional_options > "${$hey_output}
|
||||
wrk "${wrk_options[@]}" > "${$wrk_output}" 2>&1
|
||||
hey "${hey_options[@]}" > "${$hey_output}
|
||||
done
|
||||
done
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user