You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The “FAILURES” show on Web UI is error .
I searched the source code,found there may have two bugs in Lib/site-packages/locust/stats.py
one is in line 279 the calculate of fail_ratio,in code is :
float(self.num_failures) / (self.num_requests + self.num_failures)
but i understand that the self.num_requests is total number of the requests, not the only the pass requests. so the correct calculate of fail_ratio may be
float(self.num_failures) / self.num_requests
The same error may happend at line 387:
fail_percent = (self.num_failures/float(self.num_requests + self.num_failures))*100
Expected behavior
the correct calculate of fail_ratio may be
float(self.num_failures) / self.num_requests
Description of issue
The “FAILURES” show on Web UI is error .
I searched the source code,found there may have two bugs in Lib/site-packages/locust/stats.py
one is in line 279 the calculate of fail_ratio,in code is :
float(self.num_failures) / (self.num_requests + self.num_failures)
but i understand that the self.num_requests is total number of the requests, not the only the pass requests. so the correct calculate of fail_ratio may be
float(self.num_failures) / self.num_requests
The same error may happend at line 387:
fail_percent = (self.num_failures/float(self.num_requests + self.num_failures))*100
Expected behavior
the correct calculate of fail_ratio may be
float(self.num_failures) / self.num_requests
Actual behavior
TBD
Environment settings
Steps to reproduce (for bug reports)
TBD - please provide example code
The text was updated successfully, but these errors were encountered: