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

Provide a way to specify locust counts and hatch rate per locust class #683

Closed
hyperair opened this issue Nov 13, 2017 · 9 comments
Closed

Comments

@hyperair
Copy link
Contributor

Description of issue / feature request

Currently, when running locust with multiple Locust classes, there isn't a way to specify how many instances of each locust class we want to hatch from the web interface, whether by UI widget or by API call. As a result, if we want to run tests with multiple combinations of FooLocust and BarLocust counts, we need to mess with the weightage of each locust class in the codebase of each locust slave.

Expected behavior

Ideally, there would be a way to specify the exact counts of each locust type during runtime without requiring code changes, e.g.

{
    "FooLocust": {"locust_count": 123, "hatch_rate": 12},
    "BarLocust": {"locust_count": 234, "hatch_rate": 34}
}
@thomas-phillips-nz
Copy link

You could use environment variables to change the weighting of each class as a work-around for now, rather than changing the codebase.

@cgoldberg
Copy link
Member

send a pull request

@hyperair
Copy link
Contributor Author

@cgoldberg Yeah, working on it.

@thomas-phillips-nz That's what I'm doing now, but the slaves need to be restarted with different environment variables set, which makes it a bit clunky.

@hyperair
Copy link
Contributor Author

@cgoldberg PR submitted: ^

@hyperair
Copy link
Contributor Author

Oops, it's all red, hang on.

@hyperair
Copy link
Contributor Author

Yay, it's all green now

@cyberw
Copy link
Collaborator

cyberw commented Oct 18, 2019

Hi! Is this something you still need? See my comment on the PR...

@hyperair
Copy link
Contributor Author

Hey @cyberw, thanks for getting back to me. I don't think I'll need it in the near future, but I'll keep my branch around in case I do. I still do think that the feature is desirable though.

@cyberw
Copy link
Collaborator

cyberw commented Dec 30, 2019

Closing this for now. Again, sorry for the slow respone on your PR :)

@cyberw cyberw closed this as completed Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants