aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYichen Wang <yicwang@cisco.com>2018-02-16 15:09:00 -0800
committerYichen Wang <yicwang@cisco.com>2018-02-16 15:09:41 -0800
commit1447c569d309218960a8630dcafd1a657023f281 (patch)
tree38ceb0f146c89527d9c747dde9e6c355798a14b6
parentd1db421698dd040d320f20c642010d3fa2627bf8 (diff)
[NFVBENCH-67] NFVbench should have same TX rate for different rate formats
Change-Id: I55e03319efba353dd3067b8b946815b631a87896 Signed-off-by: Yichen Wang <yicwang@cisco.com>
-rwxr-xr-xnfvbench/traffic_client.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/nfvbench/traffic_client.py b/nfvbench/traffic_client.py
index 57141be..bdcc027 100755
--- a/nfvbench/traffic_client.py
+++ b/nfvbench/traffic_client.py
@@ -518,6 +518,10 @@ class TrafficClient(object):
unidir_reverse_pps = int(self.config.unidir_reverse_traffic_pps)
if unidir_reverse_pps > 0:
self.run_config['rates'].append({'rate_pps': str(unidir_reverse_pps)})
+ # Fix for [NFVBENCH-67], convert the rate string to PPS
+ for idx, rate in enumerate(self.run_config['rates']):
+ if 'rate_pps' not in rate:
+ self.run_config['rates'][idx] = {'rate_pps': self.__convert_rates(rate)['rate_pps']}
self.gen.clear_streamblock()
self.gen.create_traffic(frame_size, self.run_config['rates'], bidirectional, latency=True)