-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdebugtcontrolperformance
More file actions
executable file
·56 lines (53 loc) · 1.47 KB
/
debugtcontrolperformance
File metadata and controls
executable file
·56 lines (53 loc) · 1.47 KB
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
55
#!/bin/bash
echo "Prepare the testing"
echo "Shutdown auth2 server first"
SERVERS=11
while [[ true ]]; do
servers=$(ps aux | grep "authome" | grep "python" | wc -l)
if [[ ${servers} -gt 0 ]]; then
pkill -f "authome"
sleep 0.1
else
echo "Auth2 server is closed."
break
fi
done
echo "Clear previous logs"
rm ./logs/auth2_8070*.log
i=1
while [[ ${i} -lt 6 ]]; do
echo "==================================================="
echo "Traffic control performance testing round ${i}"
echo "Begin to start auth2 server"
./start_auth2 auth01 True
while [[ true ]]; do
servers=$(ps aux | grep "authome" | grep "python" | wc -l)
if [[ ${servers} -ne ${SERVERS} ]]; then
sleep 0.1
else
echo "Auth2 server is running."
break
fi
done
./testtcontrolperformance_dev > tcontrolperformancetest_${i}.log 2>&1
echo "Shutdown auth2 server after testing"
kill $(cat ./logs/auth2_8070.pid)
while [[ true ]]; do
servers=$(ps aux | grep "authome" | grep "python" | wc -l)
if [[ ${servers} -gt 0 ]]; then
sleep 0.1
else
echo "Auth2 server is closed."
break
fi
done
cp ./logs/auth2_8070.log ./logs/auth2_8070_${i}.log
rm ./logs/auth2_8070.log
((++i))
done
echo "process auth2 logs"
i=1
while [[ ${i} -lt 6 ]]; do
python process_tcontrollog.py ./logs/auth2_8070_${i}.log
((++i))
done