[dts] [PATCH V1 4/5] framework/pktgen_ixia: measure throughput supports multiple

yufengmx yufengx.mo at intel.com
Tue Aug 6 08:58:43 CEST 2019


 return values

*. remove duration option used in ixia module, move duration option in
   testing scenario methods(latency/loss/throughput) in pktgen_base module.
*. remove un-used parameters in _start_transmission method.

Signed-off-by: yufengmx <yufengx.mo at intel.com>
---
 framework/pktgen_ixia.py | 29 +++--------------------------
 1 file changed, 3 insertions(+), 26 deletions(-)

diff --git a/framework/pktgen_ixia.py b/framework/pktgen_ixia.py
index 80481fe..467188c 100644
--- a/framework/pktgen_ixia.py
+++ b/framework/pktgen_ixia.py
@@ -1244,7 +1244,6 @@ class Ixia(SSHConnection):
         ''' start ixia ports '''
         self.configure_transmission(run_opt)
         self.start_transmission()
-        time.sleep(run_opt.get('duration') or 5)
 
     def remove_all_streams(self):
         ''' delete all streams on all ixia ports '''
@@ -1649,39 +1648,17 @@ class IxiaPacketGenerator(PacketGenerator):
         self._preset_ixia_port()
 
     def _start_transmission(self, stream_ids, options={}):
-        '''
-        :param sample_delay:
-        After traffic start ``sample_delay`` seconds, start get runtime statistics
-        '''
         # get rate percentage
         rate_percent = options.get('rate') or '100'
-        # get duration
-        duration = options.get("duration") or 5
-        duration = int(duration) if isinstance(duration, (str, unicode)) \
-                                      else duration
-        # get sample interval
-        _sample_delay = options.get("sample_delay") or duration/2
-        sample_delay = int(_sample_delay) \
-                            if isinstance(_sample_delay, (str, unicode)) \
-                            else _sample_delay
-        # get configuration from pktgen config file
-        warmup = int(self.conf["warmup"]) if self.conf.has_key("warmup") \
-                                          else 25
-        wait_interval, core_mask = (warmup+30, self.conf["core_mask"]) \
-                            if self.conf.has_key("core_mask") \
-                            else (warmup+5, None)
-        #-------------------------------------------------------------------
         # run ixia server
         try:
             ###########################################
             # Start traffic on port(s)
             self.logger.info("begin traffic ......")
             run_opt = {
-                'ports':    self._traffic_ports,
-                'mult':     rate_percent,
-                'duration': duration,
-                'core_mask':core_mask,
-                'force':    True,}
+                'ports':     self._traffic_ports,
+                'mult':      rate_percent,
+                'force':     True, }
             self._conn.start(**run_opt)
         except Exception as e:
             self.logger.error(e)
-- 
1.9.3



More information about the dts mailing list