Conversation
…t-fork into remove-specific-users
|
Hi! Sorry for the long response time, last couple of weeks have been insanely busy. I think this looks very cool! Can you show a more complete example of how it would be used? Calling new_dispatch "manually" is a bit of a way to use Locust... |
|
Ah no problems @cyberw thanks for looking at this. I will get an example added (is this best placed here? Aware there is a lot here already and don't want to pollute the timeline too much, but then again some code would be nice to illustrate how this works). Also just to expand/clarify on my original explanation, the intention for this and usage would be calling through the master runner Usage would be:
Couple of things to note:
The latter is not new either but worthy of note as any future calls that percolate through to a The inverse of this is, if |
|
Hey, sorry again for not replying promptly. I do like this feature, but I wonder if it wouldn't make more sense to support an entirely different mode, where you always set specific User counts for the various classes instead of using weights? Probably a bit bigger change to implement, but if you're interested I'll be sure to dedicate some attention to this.
Yes, that's the right place for it. |
|
Again many thanks for the input @cyberw. I'll get an example drafted up in code and added. Your right in your assessment this is more of a patch that will enhance rather than wholesale change/addition to the functionality. I have found in the past that its really useful to be able to tune specific As you mentioned its would require a lot more in depth work than this simple change :) but would be amazingly useful. |
|
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 20 days. |
|
This PR was closed because it has been marked stale for 20 days with no activity. |
What
The modification in this PR is to enhance the existing (very useful) functionality of being able to increase the amount locust users for a specific User Class.
Changes in this pr allows us to decrease the running locust users for individual user classes (rather than all user classes) deterministically.
The functionality remains the same for normal spawn/despawn events where user classes are not specified.
Currently in locust we can
[UserA, UserB, UserC]and are running weight 1,1,1,{"UserA": 2, "UserB": 1, "UserC": 1},With the changes in this pr we can now do the following:
{"UserA": 1, "UserB": 1, "UserC": 1},new_dispatch( self, target_user_count=2, spawn_rate=1, user_classes[UserA] ){"UserA": 0, "UserB": 1, "UserC": 1}