diff options
author | Serhiy Pshyk <serhiyx.pshyk@intel.com> | 2019-01-31 14:23:59 +0000 |
---|---|---|
committer | Serhiy Pshyk <serhiyx.pshyk@intel.com> | 2019-01-31 14:31:23 +0000 |
commit | 11b0b1e3cfcc4b09008c33903d4bf70eb96beba7 (patch) | |
tree | fa1efca8d7042217a27c64e9c09c86b7c647e5bc /yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py | |
parent | 79cf0db4a45b64f2663468b7ea303b9c06fb2010 (diff) |
Add rate 'resolution' option for IXIA rfc2544 test
Rate resolution value is compared with the difference between
the rates in two consecutive iterations. If the difference
is smaller than the resolution, the test stops.
JIRA: YYARDSTICK-1592
Change-Id: I3f203d33d1688734a59a8f62f31e3ad238bc63b0
Signed-off-by: Serhiy Pshyk <serhiyx.pshyk@intel.com>
Diffstat (limited to 'yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py')
-rw-r--r-- | yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py | 25 |
1 files changed, 14 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 c2327733a..2c3140f8c 100644 --- a/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py +++ b/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py @@ -543,6 +543,7 @@ class IxiaResourceHelper(ClientResourceHelper): min_tol = self.rfc_helper.tolerance_low max_tol = self.rfc_helper.tolerance_high precision = self.rfc_helper.tolerance_precision + resolution = self.rfc_helper.resolution default = "00:00:00:00:00:00" self._build_ports() @@ -563,8 +564,8 @@ class IxiaResourceHelper(ClientResourceHelper): try: while not self._terminated.value: - first_run = traffic_profile.execute_traffic( - self, self.client, mac) + first_run = traffic_profile.execute_traffic(self, self.client, + mac) self.client_started.value = 1 # pylint: disable=unnecessary-lambda utils.wait_until_true(lambda: self.client.is_traffic_stopped(), @@ -573,7 +574,8 @@ class IxiaResourceHelper(ClientResourceHelper): traffic_profile.config.duration) completed, samples = traffic_profile.get_drop_percentage( - samples, min_tol, max_tol, precision, first_run=first_run) + samples, min_tol, max_tol, precision, resolution, + first_run=first_run) self._queue.put(samples) if completed: @@ -594,6 +596,7 @@ class IxiaResourceHelper(ClientResourceHelper): min_tol = self.rfc_helper.tolerance_low max_tol = self.rfc_helper.tolerance_high precision = self.rfc_helper.tolerance_precision + resolution = self.rfc_helper.resolution default = "00:00:00:00:00:00" self._build_ports() @@ -614,6 +617,7 @@ class IxiaResourceHelper(ClientResourceHelper): try: completed = False + self.rfc_helper.iteration.value = 0 self.client_started.value = 1 while completed is False and not self._terminated.value: LOG.info("Wait for task ...") @@ -626,9 +630,11 @@ class IxiaResourceHelper(ClientResourceHelper): if task != 'RUN_TRAFFIC': continue - LOG.info("Got %s task", task) - first_run = traffic_profile.execute_traffic( - self, self.client, mac) + self.rfc_helper.iteration.value += 1 + LOG.info("Got %s task, start iteration %d", task, + self.rfc_helper.iteration.value) + first_run = traffic_profile.execute_traffic(self, self.client, + mac) # pylint: disable=unnecessary-lambda utils.wait_until_true(lambda: self.client.is_traffic_stopped(), timeout=traffic_profile.config.duration * 2) @@ -636,7 +642,8 @@ class IxiaResourceHelper(ClientResourceHelper): traffic_profile.config.duration) completed, samples = traffic_profile.get_drop_percentage( - samples, min_tol, max_tol, precision, first_run=first_run) + samples, min_tol, max_tol, precision, resolution, + first_run=first_run) self._queue.put(samples) if completed: @@ -653,10 +660,6 @@ class IxiaResourceHelper(ClientResourceHelper): self.client_started.value = 0 LOG.debug("IxiaResourceHelper::run_test done") - def collect_kpi(self): - self.rfc_helper.iteration.value += 1 - return super(IxiaResourceHelper, self).collect_kpi() - class IxiaTrafficGen(SampleVNFTrafficGen): |