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

Remove SubLocust and merge into Locust class #16

Closed
cgbystrom opened this issue Jan 10, 2012 · 4 comments
Closed

Remove SubLocust and merge into Locust class #16

cgbystrom opened this issue Jan 10, 2012 · 4 comments

Comments

@cgbystrom
Copy link
Member

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.

@ronniekk
Copy link
Contributor

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.

@heyman
Copy link
Member

heyman commented Jan 14, 2012

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.

@heyman
Copy link
Member

heyman commented Oct 31, 2012

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.

@heyman
Copy link
Member

heyman commented Nov 27, 2012

Solved by the new TaskSet API (#43).

@heyman heyman closed this as completed Nov 27, 2012
pancaprima added a commit to pancaprima/locust that referenced this issue Nov 29, 2017
…_ramp_not_shown

fixing bug hide edit in ramp
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

3 participants