Update benchmark.sh
This commit is contained in:
parent
88e26bf594
commit
27e5c01812
@ -1,8 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
functions=(hello isprime)
|
functions=(isprime hello-scale isprime-scale)
|
||||||
connections=(1000)
|
connections=(50)
|
||||||
times=(1m)
|
times=(5m)
|
||||||
kuberhost="node1:32631"
|
kuberhost="node1:32631"
|
||||||
maxthreads=40
|
maxthreads=40
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ then
|
|||||||
cp $HOME/go/bin/hey /usr/local/bin
|
cp $HOME/go/bin/hey /usr/local/bin
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "Benchmarking GET functions\n"
|
echo -e "Benchmarking functions\n"
|
||||||
for function in "${functions[@]}"
|
for function in "${functions[@]}"
|
||||||
do
|
do
|
||||||
echo -e "Benchmarking $function\n"
|
echo -e "Benchmarking $function\n"
|
||||||
@ -46,11 +46,14 @@ do
|
|||||||
for time in "${times[@]}"
|
for time in "${times[@]}"
|
||||||
do
|
do
|
||||||
echo -e "Time: $time\n"
|
echo -e "Time: $time\n"
|
||||||
echo -e "wrk"
|
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.wrk.txt 2>&1
|
datetime=$(date '+%Y-%m-%d-%H-%M-%S')
|
||||||
echo -e "hey"
|
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
|
||||||
hey -c $connection -z $time -m POST -host "$function.kubeless" -D $function.body -T "application/json" http://$kuberhost/$function > ./$function.$connection.$time.hey.txt
|
echo -e "hey-summary\n"
|
||||||
date
|
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
|
||||||
|
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
|
||||||
|
echo -e "$datetime"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user