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 failure percentage stats printed to stdout are calculated incorrectly. Seen here fail_percent = (self.num_failures/float(self.num_requests + self.num_failures))*100
Expected behavior
If something fails every request made, the failure percentage should show 100%.
The calculation should be fail_percent = float(self.num_failures/self.num_requests)*100
Actual behavior
It shows 50% if a request fails every attempt.
Environment settings
OS: Fedora 29
Python version: 3.6.8
Locust version: latest source
Steps to reproduce (for bug reports)
Create a locust file with any failing requests. You can see the number of failures don't match up with the failure percentage.
The text was updated successfully, but these errors were encountered:
Description of issue
The failure percentage stats printed to stdout are calculated incorrectly.
Seen here
fail_percent = (self.num_failures/float(self.num_requests + self.num_failures))*100
Expected behavior
If something fails every request made, the failure percentage should show 100%.
The calculation should be
fail_percent = float(self.num_failures/self.num_requests)*100
Actual behavior
It shows 50% if a request fails every attempt.
Environment settings
Steps to reproduce (for bug reports)
Create a locust file with any failing requests. You can see the number of failures don't match up with the failure percentage.
The text was updated successfully, but these errors were encountered: