Skip to content

Commit 5f5c942

Browse files
committed
Add the url test file and change test script http_load_test.sh to test_new_conn_rate.sh
1 parent a3a7b47 commit 5f5c942

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test_client/http_load_test.sh renamed to test_client/test_new_conn_rate.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
declare -i threads_nr=10
44
declare -i test_time=300
5+
declare test_url="./url.txt"
56

67
test_exit()
78
{
@@ -18,6 +19,10 @@ if [ $# -gt 1 ]; then
1819
test_time=$2
1920
fi
2021

22+
if [ $# -gt 2 ]; then
23+
test_url=$3
24+
fi
25+
2126
trap "test_exit" 2 3 9 15
2227

2328
echo "Start $threads_nr threads, ${threads_nr}k new connections per second"
@@ -26,7 +31,7 @@ echo "Test time is ${test_time} seconds"
2631
declare -i i=0;
2732

2833
while ((i < threads_nr)); do
29-
http_load -rate 1000 -seconds ${test_time} ./url.txt 1>/dev/null 2>&1 &
34+
http_load -rate 1000 -seconds ${test_time} ${test_url} 1>/dev/null 2>&1 &
3035
let ++i
3136
done
3237

0 commit comments

Comments
 (0)