Open paulcFanDuel opened 3 weeks ago
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...
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}