X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=yardstick%2Fnetwork_services%2Ftraffic_profile%2Fprox_ACL.py;h=7a228001673ff80539bd8c552fcf569c7dcb511b;hb=b820c1335b9a3fa84125e95d1345d6abf8033d50;hp=cb6246fcd45b301a385c0e8a8a6c5525966f01b5;hpb=4f842b4a7cedcc5ba89542955bf2b64c3451361d;p=yardstick.git diff --git a/yardstick/network_services/traffic_profile/prox_ACL.py b/yardstick/network_services/traffic_profile/prox_ACL.py index cb6246fcd..7a2280016 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,10 @@ 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...") + for _ in range(self.prox_config["attempts"]): + result, port_samples = self._profile_helper.run_test(pkt_size, duration, + test_value, self.tolerated_loss) - samples = result.get_samples(pkt_size) - self.fill_samples(samples, traffic_gen) + samples = result.get_samples(pkt_size, result.pkt_loss, port_samples) self.queue.put(samples)