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

Locust with custom clients only displays maximum response time #1084

Closed
adrianojsoares1 opened this issue Sep 17, 2019 · 2 comments
Closed

Comments

@adrianojsoares1
Copy link

adrianojsoares1 commented Sep 17, 2019

Description of issue

Any calls to events.request_failure.fire or events.request_success.fire update the maximum response time only on the UI, not the average, median or min. This occurs when using the response_time parameter. The code in question:

Expected behavior

The UI should show the Maximum, Average, Median, and Minimum response time

Actual behavior

The UI shows only the Maximum response time, and the Average, Median, and Minimum as 0.

Screen Shot 2019-09-17 at 1 47 03 PM

Environment settings

  • OS: Amazon Linux 2018.3
  • Python version: 3.7
  • Locust version: 0.11

Steps to reproduce (for bug reports)

start_time = time.time()
try:
    result = self.redis_client.zrevrange(key, 0, -1)
except Exception as e:
    execution_time = int((time.time() - start_time) * 1000)
    events.request_failure.fire(request_type=command, name=key, response_time=execution_time, exception=e)
else:
    execution_time = int((time.time() - start_time) * 1000)
    events.request_success.fire(request_type=command, name=key, response_time=execution_time, response_length=len(str(result)))
@cyberw cyberw added the hacktoberfest See https://hacktoberfest.digitalocean.com for more info label Oct 19, 2019
@cyberw cyberw removed the hacktoberfest See https://hacktoberfest.digitalocean.com for more info label Oct 31, 2019
@cyberw
Copy link
Collaborator

cyberw commented Oct 31, 2019

hi @adriano-chwy ! I could not reproduce this. Is it possible that your response times are actually <1ms for real?

@adrianojsoares1
Copy link
Author

Hey @cyberw, thanks for looking into this. I could not reproduce the issue either outside of this example, and due to the redis cluster being in the same availability zone as the server I can only assume it's possible for <1ms response times. I will close this for now.

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

No branches or pull requests

3 participants