mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
traffic: traffic_replay --latency-timeout to control final wait
Conversations that haven't finished within some acceptable margin of on-time can be said to have failed. This is where you specify that margin. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
b737552ed3
commit
17579dd810
@ -1534,6 +1534,7 @@ def replay(conversation_seq,
|
|||||||
accounts=None,
|
accounts=None,
|
||||||
dns_rate=0,
|
dns_rate=0,
|
||||||
duration=None,
|
duration=None,
|
||||||
|
latency_timeout=1.0,
|
||||||
stop_on_any_error=False,
|
stop_on_any_error=False,
|
||||||
**kwargs):
|
**kwargs):
|
||||||
|
|
||||||
@ -1559,7 +1560,7 @@ def replay(conversation_seq,
|
|||||||
# end slightly after the last packet of the last conversation
|
# end slightly after the last packet of the last conversation
|
||||||
# to start. Conversations other than the last could still be
|
# to start. Conversations other than the last could still be
|
||||||
# going, but we don't care.
|
# going, but we don't care.
|
||||||
duration = conversation_seq[-1][-1][0] + 1.0
|
duration = conversation_seq[-1][-1][0] + latency_timeout
|
||||||
|
|
||||||
print("We will start in %.1f seconds" % delay,
|
print("We will start in %.1f seconds" % delay,
|
||||||
file=sys.stderr)
|
file=sys.stderr)
|
||||||
|
@ -84,6 +84,8 @@ def main():
|
|||||||
model_group.add_option('-D', '--duration', type='float', default=60.0,
|
model_group.add_option('-D', '--duration', type='float', default=60.0,
|
||||||
help=('Run model for this long (approx). '
|
help=('Run model for this long (approx). '
|
||||||
'Default 60s for models'))
|
'Default 60s for models'))
|
||||||
|
model_group.add_option('--latency-timeout', type='float', default=None,
|
||||||
|
help=('Wait this long for last packet to finish'))
|
||||||
model_group.add_option('-r', '--replay-rate', type='float', default=1.0,
|
model_group.add_option('-r', '--replay-rate', type='float', default=1.0,
|
||||||
help='Replay the traffic faster by this factor')
|
help='Replay the traffic faster by this factor')
|
||||||
model_group.add_option('--traffic-summary',
|
model_group.add_option('--traffic-summary',
|
||||||
@ -368,6 +370,7 @@ def main():
|
|||||||
accounts=accounts,
|
accounts=accounts,
|
||||||
dns_rate=opts.dns_rate,
|
dns_rate=opts.dns_rate,
|
||||||
duration=opts.duration,
|
duration=opts.duration,
|
||||||
|
latency_timeout=opts.latency_timeout,
|
||||||
badpassword_frequency=opts.badpassword_frequency,
|
badpassword_frequency=opts.badpassword_frequency,
|
||||||
prefer_kerberos=opts.prefer_kerberos,
|
prefer_kerberos=opts.prefer_kerberos,
|
||||||
statsdir=statsdir,
|
statsdir=statsdir,
|
||||||
|
Loading…
Reference in New Issue
Block a user