diff options
author | Alec Hothan <ahothan@cisco.com> | 2017-09-20 22:37:16 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-09-20 22:37:16 +0000 |
commit | 846250f4c570798a1058dd8d3a405513c4900932 (patch) | |
tree | 412c47be137179707f0e168bf22b747df6595b26 | |
parent | f88f79566bebfcfdb4f70cd7870220d285cd1ece (diff) | |
parent | 34c79fa7279ead3180d4a0096e9bdeaef3907cf2 (diff) |
Merge "NFVBENCH-30 check_traffic_time_sec not working as expected"
-rw-r--r-- | nfvbench/traffic_client.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nfvbench/traffic_client.py b/nfvbench/traffic_client.py index 4337ad3..7542d0b 100644 --- a/nfvbench/traffic_client.py +++ b/nfvbench/traffic_client.py @@ -419,12 +419,13 @@ class TrafficClient(object): # ensures enough traffic is coming back threshold = (self.config.service_chain_count - 1) / float(self.config.service_chain_count) - - for it in xrange(self.config.generic_retry_count): + retry_count = (self.config.check_traffic_time_sec + + self.config.generic_poll_sec - 1) / self.config.generic_poll_sec + for it in xrange(retry_count): self.gen.clear_stats() self.gen.start_traffic() LOG.info('Waiting for packets to be received back... ({} / {})'.format(it + 1, - self.config.generic_retry_count)) + retry_count)) time.sleep(self.config.generic_poll_sec) self.gen.stop_traffic() stats = self.gen.get_stats() |