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