Update the user guide and script about performance test
[pti/o2.git] / tests / locust / README.md
1 # locust for load testing
2
3 ## Start procedure
4
5 Here is the sample command to run one master worker with 7 sub worker
6
7 ```bash
8 # main worker:  
9 export SMO_TOKEN_DATA=<SMO token data>
10 locust -f ocloud.py -H https://128.224.115.34:30205 --master
11
12 # worker_1:  
13 export SMO_TOKEN_DATA=<SMO token data>
14 locust -f ocloud.py --worker
15 #worker_2:  
16 export SMO_TOKEN_DATA=<SMO token data>
17 locust -f ocloud.py --worker
18 #worker_3:  
19 export SMO_TOKEN_DATA=<SMO token data>
20 locust -f ocloud.py --worker
21 #worker_4:  
22 export SMO_TOKEN_DATA=<SMO token data>
23 locust -f ocloud.py --worker
24 #worker_5:  
25 export SMO_TOKEN_DATA=<SMO token data>
26 locust -f ocloud.py --worker
27 #worker_6:  
28 export SMO_TOKEN_DATA=<SMO token data>
29 locust -f ocloud.py --worker
30 #worker_7:  
31 export SMO_TOKEN_DATA=<SMO token data>
32 locust -f ocloud.py --worker
33 ```
34
35 If you can use goreman to run [goreman](github.com/mattn/goreman), feel free to use it.
36
37 ```bash
38 export SMO_TOKEN_DATA=<SMO token data>
39 cat <<EOF >>Procfile
40 ocloud:  locust -f ocloud.py -H https://128.224.115.34:30205 --master
41 ocloud_1:  locust -f ocloud.py --worker
42 ocloud_2:  locust -f ocloud.py --worker
43 ocloud_3:  locust -f ocloud.py --worker
44 ocloud_4:  locust -f ocloud.py --worker
45 ocloud_5:  locust -f ocloud.py --worker
46 ocloud_6:  locust -f ocloud.py --worker
47 ocloud_7:  locust -f ocloud.py --worker
48 EOF
49 ```
50
51 Run locust with 7 sub workers through goreman
52 ```bash
53 goreman -f Procfile start
54 ```