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.weight supported, just undocumented? #123

Closed
sanga opened this issue Jan 10, 2014 · 4 comments · Fixed by #125
Closed

locust.weight supported, just undocumented? #123

sanga opened this issue Jan 10, 2014 · 4 comments · Fixed by #125

Comments

@sanga
Copy link
Contributor

sanga commented Jan 10, 2014

Seems like it works i.e. that the following does what you'd expect:

class ReallyUnlikelyLocust(Locust):
    weight = 1
    ....

class MuchMoreLikelyLocust(Locust):
    weight = 100
    ....

However, so far as I can tell:

  • it's undocumented
  • locust -f blah.py ReallyUnlikelyLocust MuchMoreLikelyLocust --show-task-ratio[-json] returns incorrect information
@Jahaja
Copy link
Member

Jahaja commented Jan 10, 2014

Yeah, it's supported and we should update the docs accordingly. show-task-ratio should be fixed as well.

I think the reason that it's not documented is because we haven't used it much.

@sanga
Copy link
Contributor Author

sanga commented Jan 10, 2014

Sure. I suspect it's not used that much in general, as this has been here for a while I guess. I only spotted it as I was refactoring inspectlocust a bit (to allow floats for task weights)

@Jahaja
Copy link
Member

Jahaja commented Jan 10, 2014

There's some value to it. I've used it for a use-case similar to this:

class WebUser(Locust):
    weight = 10
    ....

class MobileUser(Locust):
    weight = 1
    ....

@sanga
Copy link
Contributor Author

sanga commented Jan 10, 2014

Yeah, it definitely has value - I could find a use for this too (now that I know about it). It guess it just hasn't been widely used as it's not documented ;) Well, I couldn't find it at least.

This was referenced Jan 10, 2014
@heyman heyman closed this as completed Feb 3, 2014
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

Successfully merging a pull request may close this issue.

3 participants