diff options
author | Douglas Bagnall <douglas.bagnall@catalyst.net.nz> | 2018-10-23 11:58:52 +1300 |
---|---|---|
committer | Douglas Bagnall <dbagnall@samba.org> | 2019-01-08 23:55:34 +0100 |
commit | 524777e681b1fecf5686843f10ae01637285a891 (patch) | |
tree | 28f4579a468ad8e4a4750fb52dd7e0aedd261093 /script/traffic_replay | |
parent | bda7f35a5e1418a3e9d4f582f72d2bbe9cb10f44 (diff) | |
download | samba-524777e681b1fecf5686843f10ae01637285a891.tar.gz |
traffic: add option to reanimate dying conversations
The traffic model is generated from a window in time, which makes
conversations appear to start and stop unnaturally at the window
boundaries. When the window is short compared to the traffic replay
time and the true expected conversation length, this has a significant
distorting effect, leading to more conversations than would be
expected to generate a given number of packets.
To offset this slightly we add the --conversation-persistence option
which tries to convert apparent death into a longish wait.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'script/traffic_replay')
-rwxr-xr-x | script/traffic_replay | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/script/traffic_replay b/script/traffic_replay index b25476cae4a..a02539ffa73 100755 --- a/script/traffic_replay +++ b/script/traffic_replay @@ -88,6 +88,10 @@ def main(): help=('Wait this long for last packet to finish')) model_group.add_option('-r', '--replay-rate', type='float', default=1.0, help='Replay the traffic faster by this factor') + model_group.add_option('--conversation-persistence', type='float', + default=0.0, + help=('chance (0 to 1) that a conversation waits ' + 'when it would have died')) model_group.add_option('--traffic-summary', help=('Generate a traffic summary file and write ' 'it here (- for stdout)')) @@ -262,7 +266,8 @@ def main(): model.generate_conversation_sequences( opts.scale_traffic, opts.duration, - opts.replay_rate) + opts.replay_rate, + opts.conversation_persistence) else: conversations = [] |