-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Remove SubLocust and merge into Locust class #16
Comments
I agree. For example I often find myself duplicating min_wait/max_wait and adding wrapping functionality in my SubLocusts for accessing the "client" of the "parent". Perhaps a better way for task grouping would be to have a class with a more declarative name, such as LocustFixture or LocustCase. |
This is something I've been thinking about for a while as well. I agree that the Locust and SubLocust classes should be merged. The reason for them being two different classes is that when I wrote the original Locust class the idea was to just have a "flat" structure of weighted tasks. After that, I realized that it would be quite easy to create a class that would allow users to specify a group of sub tasks - so that we would get tasks structured in a hierarchical/tree way - without changing anything in the (back then) current API. Anyway, +1 for merging Locust and SubLocust, since it would simplify the API. When it comes to separating the user representation from the task "brain", I think I would prefer if we didn't introduce a new class that end-users would have to declare. I think that making Locust classes - when used as tasks under another Locust class - inherit the client from the parent class, would be sufficient. |
I have a working implementation of merging the functionality of SubLocust into Locust. However, we need to define a new way of specifying the main/root locust class. |
Solved by the new TaskSet API (#43). |
…_ramp_not_shown fixing bug hide edit in ramp
Looking at a normal Locust script I find SubLocusts confusing since they seem to differ so little from a normal Locust class.
As I haven't been involved with SubLocusts, what was the original idea of creating a separate class for it? Looking at code it should be fairly simple to merge it into Locust class. Would simplify the API for end-users.
Also, using Locust classes both for user representation and essentially task grouping/task sets creates a bit of complexity.
Perhaps just one of them, either the user representation or task group need a new name better explaining it's purpose?
That would avoid some confusion of the two.
The text was updated successfully, but these errors were encountered: