Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The “FAILURES” show on Web UI is error #1028

Closed
superxuu opened this issue Jun 19, 2019 · 1 comment
Closed

The “FAILURES” show on Web UI is error #1028

superxuu opened this issue Jun 19, 2019 · 1 comment

Comments

@superxuu
Copy link

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

  • OS:
  • Python version:3.7
  • Locust version:0.11

Steps to reproduce (for bug reports)

TBD - please provide example code

@cgoldberg
Copy link
Member

please submit a Pull Request. I can't decipher your English description of the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants