traffic_replay tries to distribute the users among the groups in a realistic manner - some groups will have almost all users in them. However, this becomes a problem when testing a really large database, e.g. we may want 100K users, but no more than 5K users in each group.
This patch adds a max-member option so we can limit how big the groups actually get.
If we detect that a group exceeds the max-members, we reset the group's probability (of getting selected) to zero, and then recalculate the cumulative distribution. The means that the group should no longer get selected by generate_random_membership(). (Note we can't completely remove the group from the list because that changes the list-index-to-group-ID mapping).
5517d60653b traffic_replay: Add a max-members option to cap group size
python/samba/emulate/traffic.py | 34 ++++++++++++++++++++++++++++++----
script/traffic_replay | 4 ++++
2 files changed, 34 insertions(+), 4 deletions(-)