Update benchmark.sh
This commit is contained in:
parent
db398d09d5
commit
20a2fd03d0
@ -6,7 +6,6 @@ times=(1m)
|
|||||||
kuberhost="node1:30765"
|
kuberhost="node1:30765"
|
||||||
maxthreads=40
|
maxthreads=40
|
||||||
|
|
||||||
wave_function=isprime
|
|
||||||
wave_dir_up=true
|
wave_dir_up=true
|
||||||
wave_connection=40
|
wave_connection=40
|
||||||
wave_max_conn=1600
|
wave_max_conn=1600
|
||||||
@ -33,12 +32,15 @@ then
|
|||||||
cp "$HOME"/go/bin/hey /usr/local/bin
|
cp "$HOME"/go/bin/hey /usr/local/bin
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo -e "Benchmarking functions\n"
|
||||||
|
for function in "${functions[@]}"
|
||||||
|
do
|
||||||
if [[ $* = *"--wave"* ]]
|
if [[ $* = *"--wave"* ]]
|
||||||
then
|
then
|
||||||
while true; do
|
while true; do
|
||||||
now=$(date '+%Y-%m-%d-%H-%M')
|
now=$(date '+%Y-%m-%d-%H-%M')
|
||||||
echo -e "Running"
|
echo -e "Running"
|
||||||
hey -c $wave_connection -z $wave_time -m POST -o csv -host "$wave_function.kubeless" -D "$wave_function".body -T "application/json" http://$kuberhost/"$wave_function" > ./"$wave_function"."$now".wave.txt
|
hey -c $wave_connection -z $wave_time -m POST -o csv -host "$function.kubeless" -D "$function".body -T "application/json" http://$kuberhost/"$function" > ./"$function"."$now".wave.txt
|
||||||
echo -e "Sleeping"
|
echo -e "Sleeping"
|
||||||
sleep $wave_time
|
sleep $wave_time
|
||||||
if [[ $wave_dir_up ]]
|
if [[ $wave_dir_up ]]
|
||||||
@ -59,9 +61,6 @@ while true; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
echo -e "Benchmarking functions\n"
|
|
||||||
for function in "${functions[@]}"
|
|
||||||
do
|
|
||||||
echo -e "Benchmarking $function\n"
|
echo -e "Benchmarking $function\n"
|
||||||
echo -e "Output of $function is:\n"
|
echo -e "Output of $function is:\n"
|
||||||
perl -pi -e 'chomp if eof' "$function".body
|
perl -pi -e 'chomp if eof' "$function".body
|
||||||
@ -89,5 +88,5 @@ do
|
|||||||
echo -e "$datetime"
|
echo -e "$datetime"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user