From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6343BA00E6 for ; Tue, 6 Aug 2019 08:57:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5B0BC1B9DE; Tue, 6 Aug 2019 08:57:56 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 9FA791B9D5 for ; Tue, 6 Aug 2019 08:57:54 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Aug 2019 23:57:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,352,1559545200"; d="scan'208";a="192598353" Received: from dpdk-moyufen01.sh.intel.com ([10.67.111.77]) by fmsmga001.fm.intel.com with ESMTP; 05 Aug 2019 23:57:52 -0700 From: yufengmx To: dts@dpdk.org Cc: yufengmx Date: Tue, 6 Aug 2019 14:58:43 +0800 Message-Id: <1565074724-216584-5-git-send-email-yufengx.mo@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1565074724-216584-1-git-send-email-yufengx.mo@intel.com> References: <1565074724-216584-1-git-send-email-yufengx.mo@intel.com> Subject: [dts] [PATCH V1 4/5] framework/pktgen_ixia: measure throughput supports multiple X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" 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 --- 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