aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorahothan <ahothan@cisco.com>2018-04-24 16:35:30 -0700
committerahothan <ahothan@cisco.com>2018-04-24 16:35:30 -0700
commiteff9ff971acf5c7208ab2b824b897d3183c36f3c (patch)
treeb54ecff62c8ceca9819d3bb5844e54352d7f7b37
parentca854882fe536396857ca25e84d7f18ea769c595 (diff)
[NFVBENCH-88] Fixed rate run: reported RX rate should be swapped in Run Config Table
swap the RX rates so that each direction has the far end RX rates Change-Id: Ib78b7721b07285f5173ca8d6f29f18873eb91df9 Signed-off-by: ahothan <ahothan@cisco.com>
-rwxr-xr-xnfvbench/traffic_client.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/nfvbench/traffic_client.py b/nfvbench/traffic_client.py
index 25fb871..5305da9 100755
--- a/nfvbench/traffic_client.py
+++ b/nfvbench/traffic_client.py
@@ -832,9 +832,11 @@ class TrafficClient(object):
def get_run_config(self, results):
"""Return configuration which was used for the last run."""
r = {}
+ # because we want each direction to have the far end RX rates,
+ # use the far end index (1-idx) to retrieve the RX rates
for idx, key in enumerate(["direction-forward", "direction-reverse"]):
tx_rate = results["stats"][idx]["tx"]["total_pkts"] / self.config.duration_sec
- rx_rate = results["stats"][idx]["rx"]["total_pkts"] / self.config.duration_sec
+ rx_rate = results["stats"][1 - idx]["rx"]["total_pkts"] / self.config.duration_sec
r[key] = {
"orig": self.__convert_rates(self.run_config['rates'][idx]),
"tx": self.__convert_rates({'rate_pps': tx_rate}),