-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathab_pftest.sh
32 lines (27 loc) · 903 Bytes
/
ab_pftest.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
###############python
pid=`ps aux|grep flask_app.py|grep -v grep|awk -F ' ' '{print $2}'`
echo "flask_app pid : $pid"
kill -9 $pid
python flask_app.py&
sleep 1s
python ab_pftest.py ab_pftest.conf > python.data
#############blueware
pid=`ps aux|grep flask_app.py|grep -v grep|awk -F ' ' '{print $2}'`
echo "flask_app pid : $pid"
kill -9 $pid
blueware-admin run-python flask_app.py&
sleep 1s
python ab_pftest.py ab_pftest.conf > blueware.data
##############newrelic
pid=`ps aux|grep flask_app.py|grep -v grep|awk -F ' ' '{print $2}'`
echo "flask_app pid : $pid"
kill -9 $pid
newrelic-admin run-python flask_app.py&
sleep 1s
python ab_pftest.py ab_pftest.conf > newrelic.data
#============================================
#generate report
#report url is http://10.128.7.30:8080/python-agent-pftest/report/
python gen_report.py
today=`date +"%Y-%m-%d"`
cp report/report_$today.html report/index.html