summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2018-10-23 11:58:52 +1300
committerDouglas Bagnall <dbagnall@samba.org>2019-01-08 23:55:34 +0100
commit524777e681b1fecf5686843f10ae01637285a891 (patch)
tree28f4579a468ad8e4a4750fb52dd7e0aedd261093 /script
parentbda7f35a5e1418a3e9d4f582f72d2bbe9cb10f44 (diff)
downloadsamba-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')
-rwxr-xr-xscript/traffic_replay7
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 = []