"""
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.
"""
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)