Understanding locust summary result

2019-06-10 17:08发布

问题:

I have a problem to understanding the locust result as this is the first time load test my server, I ran locust using command line on 00:00 local time with; 1000 total user , 100 hatch per second and 10000 request. Below are the result

Name                                                          # reqs      # fails     Avg     Min     Max  |  Median   req/s
--------------------------------------------------------------------------------------------------------------------------------------------
GET /api/v0/business/result/22918                                452  203(30.99%)    9980    2830   49809  |    6500    1.70
GET /api/v0/business/result/36150                                463  229(33.09%)   10636    2898   86221  |    7000    1.50
GET /api/v0/business/result/55327                                482  190(28.27%)   10401    3007   48228  |    7000    1.60
GET /api/v0/business/result/69274                                502  203(28.79%)    9882    2903   48435  |    6800    1.50
GET /api/v0/business/result/71704                                469  191(28.94%)   10714    2748   62271  |    6900    1.70
POST /api/v0/business/query                                    2268  974(30.04%)   10528    2938   55204  |    7100    7.10
GET /api/v0/suggestions/query/?q=na                            2361 1013(30.02%)   10775    2713   63359  |    6800    7.80
--------------------------------------------------------------------------------------------------------------------------------------------
Total                                                           6997 3003(42.92%)                                      22.90

Percentage of the requests completed within given times
Name                                                           # reqs    50%    66%    75%    80%    90%    95%    98%    99%   100%
--------------------------------------------------------------------------------------------------------------------------------------------
GET /api/v0/business/result/22918                                 452   6500   8300  11000  13000  20000  35000  37000  38000  49809
GET /api/v0/business/result/36150                                 463   7000   9400  12000  14000  21000  35000  37000  38000  86221
GET /api/v0/business/result/55327                                 482   7000   9800  12000  13000  21000  34000  38000  39000  48228
GET /api/v0/business/result/69274                                 502   6800   9000  11000  12000  20000  35000  37000  38000  48435
GET /api/v0/business/result/71704                                 469   6900   9500  11000  13000  21000  36000  38000  40000  62271
POST /api/v0/business/query                                     2268   7100   9600  12000  13000  21000  35000  37000  38000  55204
GET /api/v0/suggestions/query/?q=na                             2361   6800   9900  12000  14000  22000  35000  37000  39000  63359
--------------------------------------------------------------------------------------------------------------------------------------------

Error report
# occurences       Error                                                                                               
--------------------------------------------------------------------------------------------------------------------------------------------
80                 GET /api/v0/business/result/71704: "HTTPError('502 Server Error: Bad Gateway',)"                    
111                GET /api/v0/business/result/71704: "HTTPError('504 Server Error: Gateway Time-out',)"               
134                GET /api/v0/business/result/22918: "HTTPError('504 Server Error: Gateway Time-out',)"               
69                 GET /api/v0/business/result/22918: "HTTPError('502 Server Error: Bad Gateway',)"                    
92                 GET /api/v0/business/result/69274: "HTTPError('502 Server Error: Bad Gateway',)"                    
594                GET /api/v0/suggestions/query/?q=na: "HTTPError('504 Server Error: Gateway Time-out',)"            
111                GET /api/v0/business/result/69274: "HTTPError('504 Server Error: Gateway Time-out',)"               
419                GET /api/v0/suggestions/query/?q=na: "HTTPError('502 Server Error: Bad Gateway',)"                 
69                 GET /api/v0/business/result/55327: "HTTPError('502 Server Error: Bad Gateway',)"                    
121                GET /api/v0/business/result/55327: "HTTPError('504 Server Error: Gateway Time-out',)"               
397                POST /api/v0/business/query: "HTTPError('502 Server Error: Bad Gateway',)"                         
145                GET /api/v0/business/result/36150: "HTTPError('504 Server Error: Gateway Time-out',)"               
577                POST /api/v0/business/query: "HTTPError('504 Server Error: Gateway Time-out',)"                    
84                 GET /api/v0/business/result/36150: "HTTPError('502 Server Error: Bad Gateway',)"                    
--------------------------------------------------------------------------------------------------------------------------------------------

here is that I confused about :

  1. what is the meaning of the numbers below #reqs, #fails, Avg, and all number after the name on first and second table? is it to show the total request has been sent or the n-th request sent ?
  2. at the Error Report below # occurences, does total number represent number of request that cause the error ?

thanks for your answer

回答1:

First table shows the Statistic related to each row with given column explanation in millisecond but total raw shows the total number for each given column. However in your example, there is problem with the calculation of perfcentage of faliure for each raw. For the first raw: 452 requests are sent but 203 of them are failed which means 203/453 ~= 44.81% thbut in the total raw it is calculated correctly.

The second table is the distribution table which shows the percentage of request completed given time interval which in table means that 50% of the total requests to home is completed 6500ms and 66% of requests are completed in 8300ms and respectively goes on.



标签: locust