From fc16795c47fa24bdf593ef58987fe20ebd826408 Mon Sep 17 00:00:00 2001 From: xiaosuGW Date: Fri, 24 Sep 2021 16:01:26 -0400 Subject: [PATCH] upload test scripts --- runtime/tests/hey_test.sh | 14 -------------- runtime/tests/hey_test_8c.sh | 14 ++++++++++++++ runtime/tests/hey_test_total_request.sh | 14 ++++++++++++++ runtime/tests/test_8c.sh | 19 +++++++++++++++++++ runtime/tests/test_total_request.sh | 19 +++++++++++++++++++ 5 files changed, 66 insertions(+), 14 deletions(-) delete mode 100755 runtime/tests/hey_test.sh create mode 100755 runtime/tests/hey_test_8c.sh create mode 100755 runtime/tests/hey_test_total_request.sh create mode 100755 runtime/tests/test_8c.sh create mode 100755 runtime/tests/test_total_request.sh diff --git a/runtime/tests/hey_test.sh b/runtime/tests/hey_test.sh deleted file mode 100755 index 7d78f86..0000000 --- a/runtime/tests/hey_test.sh +++ /dev/null @@ -1,14 +0,0 @@ -./test_rps.sh 105.txt 60 100 105k.jpg 10000 2>&1 & -pid1=$! -./test_rps.sh 305.txt 60 100 305k.jpg 10003 2>&1 & -pid2=$! -./test_rps.sh 5.txt 60 100 5k.jpg 10006 2>&1 & -pid3=$! -./test_rps.sh 40.txt 60 100 40k.jpg 10009 2>&1 & -pid4=$! -wait -f $pid1 -wait -f $pid2 -wait -f $pid3 -wait -f $pid4 -printf "[OK]\n" - diff --git a/runtime/tests/hey_test_8c.sh b/runtime/tests/hey_test_8c.sh new file mode 100755 index 0000000..0bb8c0a --- /dev/null +++ b/runtime/tests/hey_test_8c.sh @@ -0,0 +1,14 @@ +./test_concurrency.sh 105.txt 60 100 105k.jpg 10000 2>&1 & +pid1=$! +./test_concurrency.sh 305.txt 60 100 305k.jpg 10003 2>&1 & +pid2=$! +./test_concurrency.sh 5.txt 60 100 5k.jpg 10006 2>&1 & +pid3=$! +./test_concurrency.sh 40.txt 60 100 40k.jpg 10009 2>&1 & +pid4=$! +wait -f $pid1 +wait -f $pid2 +wait -f $pid3 +wait -f $pid4 +printf "[OK]\n" + diff --git a/runtime/tests/hey_test_total_request.sh b/runtime/tests/hey_test_total_request.sh new file mode 100755 index 0000000..674cdd0 --- /dev/null +++ b/runtime/tests/hey_test_total_request.sh @@ -0,0 +1,14 @@ +./test_concurrency.sh 105.txt 5000 100 105k.jpg 10000 2>&1 & +pid1=$! +./test_concurrency.sh 305.txt 5000 100 305k.jpg 10003 2>&1 & +pid2=$! +./test_concurrency.sh 5.txt 5000 100 5k.jpg 10006 2>&1 & +pid3=$! +./test_concurrency.sh 40.txt 5000 100 40k.jpg 10009 2>&1 & +pid4=$! +wait -f $pid1 +wait -f $pid2 +wait -f $pid3 +wait -f $pid4 +printf "[OK]\n" + diff --git a/runtime/tests/test_8c.sh b/runtime/tests/test_8c.sh new file mode 100755 index 0000000..b76d1a8 --- /dev/null +++ b/runtime/tests/test_8c.sh @@ -0,0 +1,19 @@ +function usage { + echo "$0 [output file] [duration(s)] [rps] [image file] [port]" + exit 1 +} + +if [ $# != 5 ] ; then + usage + exit 1; +fi + +output=$1 +duration=$2 +rps=$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 + diff --git a/runtime/tests/test_total_request.sh b/runtime/tests/test_total_request.sh new file mode 100755 index 0000000..7114862 --- /dev/null +++ b/runtime/tests/test_total_request.sh @@ -0,0 +1,19 @@ +function usage { + echo "$0 [output file] [duration(s)] [rps] [image file] [port]" + exit 1 +} + +if [ $# != 5 ] ; then + usage + exit 1; +fi + +output=$1 +duration=$2 +rps=$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 50 -q 50 -n $duration -t 0 -m GET -D "$image" "http://10.10.1.1:$port" > $output +