From bdb1b3649fc27a0ea3aaeeb12ab7bd24ab559a80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Tue, 29 Oct 2019 13:35:44 +0100 Subject: [PATCH] watcher script --- benchmark/classic/benchmark.sh | 12 ++++++------ benchmark/classic/wacher.sh | 10 ++++++++++ 2 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 benchmark/classic/wacher.sh diff --git a/benchmark/classic/benchmark.sh b/benchmark/classic/benchmark.sh index 7bcfd15..0cc03ef 100644 --- a/benchmark/classic/benchmark.sh +++ b/benchmark/classic/benchmark.sh @@ -53,13 +53,13 @@ for function in "${functions[@]}"; do echo -e "summary $datetime\n" if $kubeless; then if [[ $* == *"--loadtest"* ]]; then - loadtest -H "Host: $function.kubeless" --rps $rps -c $connection -t $time -p "$function_firendly".body http://$kuberhost/"$function" >./data/"$function"."$connection"."$time"."$datetime".txt + loadtest -k -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" -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 $rps -c $connection -t $time http://$kuberhost/ >./data/"$function"."$connection"."$time"."$datetime".txt + loadtest -k -H "Host: $function.default.example.com" --rps $rps -c $connection -t $time http://$kuberhost/ >./data/"$function"."$connection"."$time"."$datetime".txt else hey -c "$connection" -q $rps -z "$time" -m POST -host "$function.default.example.com" http://$kuberhost/ >./data/"$function"."$connection"."$time"."$datetime".txt fi @@ -78,13 +78,13 @@ for function in "${functions[@]}"; do echo -e "for $num\n" if $kubeless; then 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 + loadtest -k -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" -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 + loadtest -k -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 @@ -99,13 +99,13 @@ for function in "${functions[@]}"; do echo -e "Connections: $climb_connection" if $kubeless; then 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 + loadtest -k -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 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 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 + loadtest -k -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 diff --git a/benchmark/classic/wacher.sh b/benchmark/classic/wacher.sh new file mode 100644 index 0000000..04af65d --- /dev/null +++ b/benchmark/classic/wacher.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +time=300 +function=hello-kubeless-go-sc + +for (( i = 1 ; i <= $time ; i++ )); do + kubectl get deployment | grep $function | awk '{print $2}' | cut -d/ -f1 >> ./data/$function.monitor.csv + echo '\n' >> ./data/$function.monitor.csv + sleep 1 +done