From 8ce7dd328e69ffeaf1609dcb909223f0f10f9524 Mon Sep 17 00:00:00 2001 From: xiaosuGW Date: Tue, 9 Nov 2021 22:05:51 -0500 Subject: [PATCH] upload scripts --- runtime/tests/hey_test_8c.sh | 27 +++- runtime/tests/hey_test_total_request.sh | 8 +- runtime/tests/start_test.sh | 49 +++++++ runtime/tests/start_test2.sh | 147 ++++++++++++++++++++ runtime/tests/start_test_compare2.sh | 49 +++++++ runtime/tests/start_test_full.sh | 175 ++++++++++++++++++++++++ runtime/tests/test_8c.sh | 8 +- runtime/tests/test_single_func.sh | 96 +++++++++++++ runtime/tests/tmp_test.sh | 18 +++ 9 files changed, 566 insertions(+), 11 deletions(-) create mode 100755 runtime/tests/start_test.sh create mode 100755 runtime/tests/start_test2.sh create mode 100755 runtime/tests/start_test_compare2.sh create mode 100755 runtime/tests/start_test_full.sh create mode 100755 runtime/tests/test_single_func.sh create mode 100755 runtime/tests/tmp_test.sh diff --git a/runtime/tests/hey_test_8c.sh b/runtime/tests/hey_test_8c.sh index 0bb8c0a..8cfb6e8 100755 --- a/runtime/tests/hey_test_8c.sh +++ b/runtime/tests/hey_test_8c.sh @@ -1,10 +1,29 @@ -./test_concurrency.sh 105.txt 60 100 105k.jpg 10000 2>&1 & +function usage { + echo "$0 [duration(s)] [concurrency]" + exit 1 +} + +if [ $# != 2 ] ; then + usage + exit 1; +fi + +duration=$1 +concurrency=$2 + +f1="105k_"$concurrency".txt" +echo $f1 +f2="305k_"$concurrency".txt" +f3="5k_"$concurrency".txt" +f4="40k_"$concurrency".txt" + +./test_8c.sh $f1 $duration $concurrency 105k.jpg 10000 2>&1 & pid1=$! -./test_concurrency.sh 305.txt 60 100 305k.jpg 10003 2>&1 & +./test_8c.sh $f2 $duration $concurrency 305k.jpg 10003 2>&1 & pid2=$! -./test_concurrency.sh 5.txt 60 100 5k.jpg 10006 2>&1 & +./test_8c.sh $f3 $duration $concurrency 5k.jpg 10006 2>&1 & pid3=$! -./test_concurrency.sh 40.txt 60 100 40k.jpg 10009 2>&1 & +./test_8c.sh $f4 $duration $concurrency 40k.jpg 10009 2>&1 & pid4=$! wait -f $pid1 wait -f $pid2 diff --git a/runtime/tests/hey_test_total_request.sh b/runtime/tests/hey_test_total_request.sh index 674cdd0..c32038c 100755 --- a/runtime/tests/hey_test_total_request.sh +++ b/runtime/tests/hey_test_total_request.sh @@ -1,10 +1,10 @@ -./test_concurrency.sh 105.txt 5000 100 105k.jpg 10000 2>&1 & +./test_total_request.sh 105.txt 5000 100 105k.jpg 10000 2>&1 & pid1=$! -./test_concurrency.sh 305.txt 5000 100 305k.jpg 10003 2>&1 & +./test_total_request.sh 305.txt 5000 100 305k.jpg 10003 2>&1 & pid2=$! -./test_concurrency.sh 5.txt 5000 100 5k.jpg 10006 2>&1 & +./test_total_request.sh 5.txt 5000 100 5k.jpg 10006 2>&1 & pid3=$! -./test_concurrency.sh 40.txt 5000 100 40k.jpg 10009 2>&1 & +./test_total_request.sh 40.txt 5000 100 40k.jpg 10009 2>&1 & pid4=$! wait -f $pid1 wait -f $pid2 diff --git a/runtime/tests/start_test.sh b/runtime/tests/start_test.sh new file mode 100755 index 0000000..2f71190 --- /dev/null +++ b/runtime/tests/start_test.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +function usage { + echo "$0 [cpu-log]" + exit 1 +} + + +#basepath=$(cd `dirname $0`; pwd) +#cpu_log=$1 + +#if [ -z $cpu_log ] +#then +# usage +#fi + + +#node1_cpu_file=$cpu_log"_node1_cpu.log" + +chmod 400 ./id_rsa +path="/users/xiaosuGW/sledge-serverless-framework/runtime/tests" + +#test c3 +server_log_file="execution_mix_srsf_3.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +echo "sledge is running" +./hey_test_8c.sh 120 3 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test c5 +server_log_file="execution_mix_srsf_5.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +echo "sledge is running" +./hey_test_8c.sh 120 5 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test c7 +server_log_file="execution_mix_srsf_7.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +echo "sledge is running" +./hey_test_8c.sh 120 7 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test c10 +server_log_file="execution_mix_srsf_10.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +echo "sledge is running" +./hey_test_8c.sh 120 10 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" diff --git a/runtime/tests/start_test2.sh b/runtime/tests/start_test2.sh new file mode 100755 index 0000000..81ff607 --- /dev/null +++ b/runtime/tests/start_test2.sh @@ -0,0 +1,147 @@ +#!/bin/bash + +function usage { + echo "$0 [cpu-log]" + exit 1 +} + + +#basepath=$(cd `dirname $0`; pwd) +#cpu_log=$1 + +#if [ -z $cpu_log ] +#then +# usage +#fi + + +#node1_cpu_file=$cpu_log"_node1_cpu.log" + +chmod 400 ./id_rsa +path="/users/xiaosuGW/sledge-serverless-framework/runtime/tests" + + +############################################################ +#test single c10 +f1="105k_edf_single_10.txt" +server_log_file="execution_edf_single_105k_10.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 120 10 105k.jpg 10000 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test single c10 +f1="105k_edf_single_20.txt" +server_log_file="execution_edf_single_105k_20.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 120 20 105k.jpg 10000 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test single c30 +f1="105k_edf_single_30.txt" +server_log_file="execution_edf_single_105k_30.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 120 30 105k.jpg 10000 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test single c40 +f1="105k_edf_single_40.txt" +server_log_file="execution_edf_single_105k_40.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 120 40 105k.jpg 10000 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + + + +##################################################### +#test single c10 +f1="305k_edf_single_10.txt" +server_log_file="execution_edf_single_305k_10.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 120 10 305k.jpg 10003 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + + +#test single c10 +f1="305k_edf_single_20.txt" +server_log_file="execution_edf_single_305k_20.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 120 20 305k.jpg 10003 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test single c30 +f1="305k_edf_single_30.txt" +server_log_file="execution_edf_single_305k_30.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 120 30 305k.jpg 10003 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test single c40 +f1="305k_edf_single_40.txt" +server_log_file="execution_edf_single_305k_40.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 120 40 305k.jpg 10003 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + + + +############################################################### +#test single c10 +f1="5k_edf_single_10.txt" +server_log_file="execution_edf_single_5k_10.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 120 10 5k.jpg 10006 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + + +#test single c10 +f1="5k_edf_single_20.txt" +server_log_file="execution_edf_single_5k_20.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 120 20 5k.jpg 10006 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test single c30 +f1="5k_edf_single_30.txt" +server_log_file="execution_edf_single_5k_30.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 120 30 5k.jpg 10006 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test single c40 +f1="5k_edf_single_40.txt" +server_log_file="execution_edf_single_5k_40.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 120 40 5k.jpg 10006 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + + +################################################################## +#test single c10 +f1="40k_edf_single_10.txt" +server_log_file="execution_edf_single_40k_10.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 120 10 40k.jpg 10009 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + + +#test single c10 +f1="40k_edf_single_20.txt" +server_log_file="execution_edf_single_40k_20.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 120 20 40k.jpg 10009 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test single c30 +f1="40k_edf_single_30.txt" +server_log_file="execution_edf_single_40k_30.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 120 30 40k.jpg 10009 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test single c40 +f1="40k_edf_single_40.txt" +server_log_file="execution_edf_single_40k_40.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 120 40 40k.jpg 10009 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + diff --git a/runtime/tests/start_test_compare2.sh b/runtime/tests/start_test_compare2.sh new file mode 100755 index 0000000..e1ab0b1 --- /dev/null +++ b/runtime/tests/start_test_compare2.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +function usage { + echo "$0 [cpu-log]" + exit 1 +} + + +#basepath=$(cd `dirname $0`; pwd) +#cpu_log=$1 + +#if [ -z $cpu_log ] +#then +# usage +#fi + + +#node1_cpu_file=$cpu_log"_node1_cpu.log" + +chmod 400 ./id_rsa +path="/users/xiaosuGW/sledge-serverless-framework/runtime/tests" + +#test c3 +server_log_file="edf_15.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +echo "sledge is running" +./hey_test_8c.sh 120 15 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test c5 +server_log_file="edf_22.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +echo "sledge is running" +./hey_test_8c.sh 120 22 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test c7 +server_log_file="edf_30.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +echo "sledge is running" +./hey_test_8c.sh 120 30 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test c10 +server_log_file="edf_38.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +echo "sledge is running" +./hey_test_8c.sh 120 38 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" diff --git a/runtime/tests/start_test_full.sh b/runtime/tests/start_test_full.sh new file mode 100755 index 0000000..6e76c37 --- /dev/null +++ b/runtime/tests/start_test_full.sh @@ -0,0 +1,175 @@ +#!/bin/bash + +function usage { + echo "$0 [cpu-log]" + exit 1 +} + + +#basepath=$(cd `dirname $0`; pwd) +#cpu_log=$1 + +#if [ -z $cpu_log ] +#then +# usage +#fi + + +#node1_cpu_file=$cpu_log"_node1_cpu.log" + +chmod 400 ./id_rsa +path="/users/xiaosuGW/sledge-serverless-framework/runtime/tests" + +#test c3 +server_log_file="execution_mix_3.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +echo "sledge is running" +./hey_test_8c.sh 300 3 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test c5 +server_log_file="execution_mix_5.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +echo "sledge is running" +./hey_test_8c.sh 300 5 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test c7 +server_log_file="execution_mix_7.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +echo "sledge is running" +./hey_test_8c.sh 300 7 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test c10 +server_log_file="execution_mix_10.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +echo "sledge is running" +./hey_test_8c.sh 300 10 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + + +############################################################ +#test single c10 +f1="105k_single_10.txt" +server_log_file="execution_single_105k_10.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 300 10 105k.jpg 10000 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test single c10 +f1="105k_single_20.txt" +server_log_file="execution_single_105k_20.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 300 20 105k.jpg 10000 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test single c30 +f1="105k_single_30.txt" +server_log_file="execution_single_105k_30.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 300 30 105k.jpg 10000 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test single c40 +f1="105k_single_40.txt" +server_log_file="execution_single_105k_40.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 300 40 105k.jpg 10000 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + + + +##################################################### +#test single c10 +f1="305k_single_10.txt" +server_log_file="execution_single_305k_10.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 300 10 305k.jpg 10003 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + + +#test single c10 +f1="305k_single_20.txt" +server_log_file="execution_single_305k_20.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 300 20 305k.jpg 10003 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test single c30 +f1="305k_single_30.txt" +server_log_file="execution_single_305k_30.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 300 30 305k.jpg 10003 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test single c40 +f1="305k_single_40.txt" +server_log_file="execution_single_305k_40.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 300 40 305k.jpg 10003 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + + + +############################################################### +#test single c10 +f1="5k_single_10.txt" +server_log_file="execution_single_5k_10.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 300 10 5k.jpg 10006 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + + +#test single c10 +f1="5k_single_20.txt" +server_log_file="execution_single_5k_20.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 300 20 5k.jpg 10006 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test single c30 +f1="5k_single_30.txt" +server_log_file="execution_single_5k_30.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 300 30 5k.jpg 10006 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test single c40 +f1="5k_single_40.txt" +server_log_file="execution_single_5k_40.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 300 40 5k.jpg 10006 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + + +################################################################## +#test single c10 +f1="40k_single_10.txt" +server_log_file="execution_single_40k_10.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 300 10 40k.jpg 10009 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + + +#test single c10 +f1="40k_single_20.txt" +server_log_file="execution_single_40k_20.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 300 20 40k.jpg 10009 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test single c30 +f1="40k_single_30.txt" +server_log_file="execution_single_40k_30.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 300 30 40k.jpg 10009 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test single c40 +f1="40k_single_40.txt" +server_log_file="execution_single_40k_40.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 300 40 40k.jpg 10009 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + diff --git a/runtime/tests/test_8c.sh b/runtime/tests/test_8c.sh index b76d1a8..4cacffb 100755 --- a/runtime/tests/test_8c.sh +++ b/runtime/tests/test_8c.sh @@ -1,19 +1,21 @@ function usage { - echo "$0 [output file] [duration(s)] [rps] [image file] [port]" + echo "$0 [output file] [duration(s)] [concurrency] [image file] [port]" exit 1 } if [ $# != 5 ] ; then + echo "input parameters are not 5" usage exit 1; fi output=$1 duration=$2 -rps=$3 +concurrency=$3 image=$4 port=$5 #hey -disable-compression -disable-keepalive -disable-redirects -c 1 -q $rps -z $duration\s -cpus 1 -t 0 -m GET -D "$image" "http://10.10.1.1:$port" -hey -disable-compression -disable-keepalive -disable-redirects -c 8 -z $duration\s -t 0 -m GET -D "$image" "http://10.10.1.1:$port" > $output +#hey -disable-compression -disable-keepalive -disable-redirects -c $concurrency -z 20s -t 0 -m GET -D "$image" "http://10.10.1.1:$port" +hey -disable-compression -disable-keepalive -disable-redirects -c $concurrency -z $duration\s -t 0 -m GET -D "$image" "http://10.10.1.1:$port" > $output diff --git a/runtime/tests/test_single_func.sh b/runtime/tests/test_single_func.sh new file mode 100755 index 0000000..121c134 --- /dev/null +++ b/runtime/tests/test_single_func.sh @@ -0,0 +1,96 @@ +#!/bin/bash + +function usage { + echo "$0 [cpu-log]" + exit 1 +} + + +#basepath=$(cd `dirname $0`; pwd) +#cpu_log=$1 + +#if [ -z $cpu_log ] +#then +# usage +#fi + + +#node1_cpu_file=$cpu_log"_node1_cpu.log" + +chmod 400 ./id_rsa +path="/users/xiaosuGW/sledge-serverless-framework/runtime/tests" + + +############################################################ + +#test single c10 +f1="srsf_single1.txt" +server_log_file="srsf_single1.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 120 1 105k.jpg 10000 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + + +#test single c10 +f1="srsf_single5.txt" +server_log_file="srsf_single5.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 120 5 105k.jpg 10000 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test single c10 +f1="srsf_single10.txt" +server_log_file="srsf_single10.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 120 10 105k.jpg 10000 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test single c10 +f1="srsf_single20.txt" +server_log_file="srsf_single20.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 120 20 105k.jpg 10000 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test single c10 +f1="srsf_single30.txt" +server_log_file="srsf_single30.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 120 30 105k.jpg 10000 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test single c10 +f1="srsf_single40.txt" +server_log_file="srsf_single40.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 120 40 105k.jpg 10000 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test single c10 +f1="srsf_single50.txt" +server_log_file="srsf_single50.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 120 50 105k.jpg 10000 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test single c10 +f1="srsf_single60.txt" +server_log_file="srsf_single60.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 120 60 105k.jpg 10000 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test single c30 +f1="srsf_single70.txt" +server_log_file="srsf_single70.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 120 70 105k.jpg 10000 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + +#test single c40 +f1="srsf_single80.txt" +server_log_file="srsf_single80.log" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +./test_8c.sh $f1 120 80 105k.jpg 10000 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" + diff --git a/runtime/tests/tmp_test.sh b/runtime/tests/tmp_test.sh new file mode 100755 index 0000000..5ecf606 --- /dev/null +++ b/runtime/tests/tmp_test.sh @@ -0,0 +1,18 @@ +chmod 400 ./id_rsa +path="/users/xiaosuGW/sledge-serverless-framework/runtime/tests" + + +#test single c10 +f1="30cpucore_single40.txt" +server_log_file="30cpucore_single40.log" +vmstat_file="30cpucore_single1_vmstat.txt" +pidstat_file="30cpucore_single1_pidstat.txt" +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start.sh $server_log_file >/dev/null 2>&1 &" +#ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/start_monitor.sh $vmstat_file $pidstat_file" +./test_8c.sh $f1 120 40 105k.jpg 10000 +ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/kill_sledge.sh" +#ssh -o stricthostkeychecking=no -i ./id_rsa xiaosuGW@10.10.1.1 "$path/stop_monitor.sh" + + + +