-
Notifications
You must be signed in to change notification settings - Fork 1
/
gen_traffic_sfcpath.sh
55 lines (43 loc) · 1.5 KB
/
gen_traffic_sfcpath.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
conn=80
max=40
for ((;;))
do
for ((i=60; i<=$conn; i++))
do
sudo ab -c $((i*10)) -n $((i*1000)) -d -q http://10.10.20.85:8888/ > ab_result.txt
sleep 0.1
done
for ((i=$conn; i>60; i--))
do
sudo ab -c $((i*10)) -n $((i*1000)) -d -q http://10.10.20.85:8888/ > ab_result.txt
sleep 0.1
done
for ((i=60; i<=$conn; i++))
do
if [ $i -ge $max ];then
sudo ab -c $((max*10)) -n $((max*1000)) -d -q http://10.10.20.85:8888/ > ab_result.txt
else
sudo ab -c $((i*10)) -n $((i*1000)) -d -q http://10.10.20.85:8888/ > ab_result.txt
fi
sleep 0.1
done
for ((i=$conn; i>=60; i--))
do
if [ $i -ge $max ];then
sudo ab -c $((max*10)) -n $((max*1000)) -d -q http://10.10.20.85:8888/ > ab_result.txt
else
sudo ab -c $((i*10)) -n $((i*1000)) -d -q http://10.10.20.85:8888/ > ab_result.txt
fi
sleep 0.1
done
for ((i=60; i<=$conn; i++))
do
sudo ab -c $((i*10)) -n $((i*500)) -d -q http://10.10.20.85:8888/ > ab_result.txt
sleep 0.1
done
for ((i=$conn; i>60; i--))
do
sudo ab -c $((i*10)) -n $((i*500)) -d -q http://10.10.20.85:8888/ > ab_result.txt
done
done