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

display stats/details before reset when --reset-stats is enabled #106

Closed
jeremyandrews opened this issue Jul 18, 2020 · 5 comments · Fixed by #129
Closed

display stats/details before reset when --reset-stats is enabled #106

jeremyandrews opened this issue Jul 18, 2020 · 5 comments · Fixed by #129
Labels
enhancement New feature or request

Comments

@jeremyandrews
Copy link
Member

When enabled, the --reset-stats flag causes Goose to flush all statistics once all GooseUser's have launched. This ensures that the subsequent averages are accurate, and don't include the ramp up time.

This issue is to enhance this so we display all statistics collected before flushing them, if we are displaying statistics. When displaying these stats, it should also be visually clear that all GooseUser's have now launched, and these are the ramp-up statistics.

@jeremyandrews jeremyandrews added the enhancement New feature or request label Jul 18, 2020
@LionsAd
Copy link
Collaborator

LionsAd commented Jul 18, 2020

I think it should be default (can be follow up):

Maybe even say something like:

[Statistics]

All users hatched, resetting statistics (disable with —no-reset-stats)
——————

Reason for default: GUI in locust does it by default or at least IIRC there is a very prominent checkbox and in my career I always used the reset as it helped distinguish ramp up from sustained load.

In most cases warmup screws with max() and avg() statistics.

If we output all statistics and give easy feedback how to disable it, I don’t see why we should not have reset stats as default.

@jeremyandrews
Copy link
Member Author

When --reset-stats is not enabled (the current default), the load test stops itself when run_time is hit, inclusive of the time it takes to spawn users. So, if you set --users 10 --run-time 1m the total run-time is 60 seconds, which includes 10 seconds of run-time. If you set --users 10 --run-time 5s the total run-time is 5 seconds, and we only launch 5 users.

A couple questions:

  • should run-time include the time it takes to spawn users?
  • does the answer change depending on if --reset-stats is enabled or disabled?
  • also consider a more extreme example, --users 1000 --run-time 1m, which will take over 15 minutes to spawn all users -- currently we'd end the test after 1 minute, but without --reset-stats (or with my coming pr with --no-reset-stats) do we exit after 1 minute or after 16 minutes?

@LionsAd
Copy link
Collaborator

LionsAd commented Jul 29, 2020

That's a hard question.

Does Locust have --run-time?

@jeremyandrews
Copy link
Member Author

Yes:
https://docs.locust.io/en/stable/config-options.html

It seems they start counting from the start of the test, not after users are spawned:
https://github.com/locustio/locust/blob/629988b36c5ddf4a201168410c594f7539b38d9f/locust/main.py#L227

In our case, I assume we'd reset the timer when all user's are spawned if --reset-stats is enabled, as we want stats for that much time.

@LionsAd
Copy link
Collaborator

LionsAd commented Jul 30, 2020

Yeah - probably cool to also allow specifying a —spawn-runtime.

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

Successfully merging a pull request may close this issue.

2 participants