aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services/traffic_profile/prox_ACL.py
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/network_services/traffic_profile/prox_ACL.py')
-rw-r--r--yardstick/network_services/traffic_profile/prox_ACL.py20
1 files changed, 8 insertions, 12 deletions
diff --git a/yardstick/network_services/traffic_profile/prox_ACL.py b/yardstick/network_services/traffic_profile/prox_ACL.py
index cb6246fcd..7f2255d99 100644
--- a/yardstick/network_services/traffic_profile/prox_ACL.py
+++ b/yardstick/network_services/traffic_profile/prox_ACL.py
@@ -26,6 +26,10 @@ class ProxACLProfile(ProxProfile):
"""
This profile adds a single stream at the beginning of the traffic session
"""
+
+ def __init__(self, tp_config):
+ super(ProxACLProfile, self).__init__(tp_config)
+
def run_test_with_pkt_size(self, traffic_gen, pkt_size, duration):
"""Run the test for a single packet size.
@@ -39,17 +43,9 @@ class ProxACLProfile(ProxProfile):
"""
test_value = self.upper_bound
-
# throughput and packet loss from the last successful test
- while test_value == self.upper_bound:
- result = traffic_gen.resource_helper.run_test(pkt_size, duration,
- test_value, self.tolerated_loss)
-
- if result.success:
- LOG.debug("Success! ")
- else:
- LOG.debug("Failure...")
-
- samples = result.get_samples(pkt_size)
- self.fill_samples(samples, traffic_gen)
+ for _ in range(self.prox_config["attempts"]):
+ result, port_samples = traffic_gen.run_test(pkt_size, duration,
+ test_value, self.tolerated_loss)
+ samples = result.get_samples(pkt_size, result.pkt_loss, port_samples)
self.queue.put(samples)