aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services
diff options
context:
space:
mode:
authorMytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>2018-08-09 17:14:39 +0100
committerVolodymyr Mytnyk <volodymyrx.mytnyk@intel.com>2018-08-10 07:44:47 +0000
commit27419ca8e790aa5105dda11b013636c5d1ad8e18 (patch)
tree30def43de42196975afbaff6805f7db94f0b1a60 /yardstick/network_services
parentf0bf7dfe6c6eac91da27c72e2dc31166269f533b (diff)
IXIA traffic stops running after first iteration
IXIA traffic stops running after first iteration when traffic profile duration is set to 60 sec. JIRA: YARDSTICK-1374 Change-Id: I216b98d43b66aabc72ed88e895b89e28572b264f Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com> Signed-off-by: Myron Sosyak <myronx.sosyak@intel.com>
Diffstat (limited to 'yardstick/network_services')
-rw-r--r--yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py18
1 files changed, 7 insertions, 11 deletions
diff --git a/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py b/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py
index 4d3bc2ce5..5203ffd9c 100644
--- a/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py
+++ b/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py
@@ -60,7 +60,7 @@ class IxiaResourceHelper(ClientResourceHelper):
def stop_collect(self):
self._terminated.value = 1
- def generate_samples(self, ports, key=None):
+ def generate_samples(self, ports, duration, key=None):
stats = self.get_stats()
samples = {}
@@ -78,10 +78,8 @@ class IxiaResourceHelper(ClientResourceHelper):
"tx_throughput_mbps": float(stats["Tx_Rate_Mbps"][port_num]),
"in_packets": int(stats["Valid_Frames_Rx"][port_num]),
"out_packets": int(stats["Frames_Tx"][port_num]),
- # NOTE(ralonsoh): we need to make the traffic injection
- # time variable.
- "RxThroughput": int(stats["Valid_Frames_Rx"][port_num]) / 30,
- "TxThroughput": int(stats["Frames_Tx"][port_num]) / 30,
+ "RxThroughput": int(stats["Valid_Frames_Rx"][port_num]) / duration,
+ "TxThroughput": int(stats["Frames_Tx"][port_num]) / duration,
}
if key:
avg_latency = stats["Store-Forward_Avg_latency_ns"][port_num]
@@ -129,13 +127,11 @@ class IxiaResourceHelper(ClientResourceHelper):
self, self.client, mac)
self.client_started.value = 1
# pylint: disable=unnecessary-lambda
- utils.wait_until_true(lambda: self.client.is_traffic_stopped())
- samples = self.generate_samples(traffic_profile.ports)
+ utils.wait_until_true(lambda: self.client.is_traffic_stopped(),
+ timeout=traffic_profile.config.duration * 2)
+ samples = self.generate_samples(traffic_profile.ports,
+ traffic_profile.config.duration)
- # NOTE(ralonsoh): the traffic injection duration is fixed to 30
- # seconds. This parameter is configurable and must be retrieved
- # from the traffic_profile.full_profile information.
- # Every flow must have the same duration.
completed, samples = traffic_profile.get_drop_percentage(
samples, min_tol, max_tol, first_run=first_run)
self._queue.put(samples)