summaryrefslogtreecommitdiffstats
path: root/tools/pkt_gen/trafficgen/trafficgen.py
diff options
context:
space:
mode:
authorMaryam Tahhan <maryam.tahhan@intel.com>2015-11-08 17:35:50 -0500
committerMaryam Tahhan <maryam.tahhan@intel.com>2015-12-02 13:47:36 +0000
commit0c292cdcf82ca1d5a71a93c1e1f91cb061a2c6f2 (patch)
tree988973cdfaa43f705856d31157967fab9afb178d /tools/pkt_gen/trafficgen/trafficgen.py
parent0606ef6290ac1e41468f57b0ef2ff1d0571aee3e (diff)
pkt_gen: add duration to all send functions
Allow a configurable duration for all send functions. JIRA: VSPERF-125 Change-Id: I7c6f5d136a7d7100e3990f7fdc00121b07081a80 Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com> Reviewed-by: Martin Klozik <martinx.klozik@intel.com> Reviewed-by: Billy O Mahony <billy.o.mahony@intel.com> Reviewed-by: Dino Simeon Madarang <dino.simeonx.madarang@intel.com> Reviewed-by: Radek Zetik <radekx.zetik@intel.com>
Diffstat (limited to 'tools/pkt_gen/trafficgen/trafficgen.py')
-rwxr-xr-xtools/pkt_gen/trafficgen/trafficgen.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/tools/pkt_gen/trafficgen/trafficgen.py b/tools/pkt_gen/trafficgen/trafficgen.py
index ff4aca0a..134db6b8 100755
--- a/tools/pkt_gen/trafficgen/trafficgen.py
+++ b/tools/pkt_gen/trafficgen/trafficgen.py
@@ -79,16 +79,16 @@ class ITrafficGenerator(object):
"""
raise NotImplementedError('Please call an implementation.')
- def send_burst_traffic(self, traffic=None, numpkts=100, time=20):
+ def send_burst_traffic(self, traffic=None, numpkts=100, duration=20):
"""Send a burst of traffic.
Send a ``numpkts`` packets of traffic, using ``traffic``
- configuration, with a timeout of ``time``.
+ configuration, for ``duration`` seconds.
Attributes:
:param traffic: Detailed "traffic" spec, i.e. IP address, VLAN tags
:param numpkts: Number of packets to send
- :param time: Time to wait to receive packets
+ :param duration: Time to wait to receive packets
:returns: dictionary of strings with following data:
- List of Tx Frames,
@@ -99,16 +99,16 @@ class ITrafficGenerator(object):
"""
raise NotImplementedError('Please call an implementation.')
- def send_cont_traffic(self, traffic=None, time=20, multistream=False):
+ def send_cont_traffic(self, traffic=None, duration=20, multistream=False):
"""Send a continuous flow of traffic.
Send packets at given framerate, using ``traffic`` configuration,
- until timeout ``time`` occurs.
+ for ``duration`` seconds..
:param traffic: Detailed "traffic" spec, i.e. IP address, VLAN tags
- :param time: Time to wait to receive packets (secs)
+ from 1 to 64,000
+ :param duration: Duration to transmit traffic.
:param multistream: Enable multistream output by overriding the
- UDP port number in ``traffic`` with values
from 1 to 64,000
:returns: dictionary of strings with following data:
- Tx Throughput (fps),
@@ -123,7 +123,7 @@ class ITrafficGenerator(object):
"""
raise NotImplementedError('Please call an implementation.')
- def start_cont_traffic(self, traffic=None, time=20):
+ def start_cont_traffic(self, traffic=None, duration=30):
"""Non-blocking version of 'send_cont_traffic'.
Start transmission and immediately return. Do not wait for
@@ -183,8 +183,7 @@ class ITrafficGenerator(object):
"""Send traffic per RFC2544 back2back test specifications.
Send packets at a fixed rate, using ``traffic``
- configuration, until minimum time at which no packet loss is
- detected is found.
+ configuration, for duration seconds.
:param traffic: Detailed "traffic" spec, i.e. IP address, VLAN
tags