summaryrefslogtreecommitdiffstats
path: root/tools/pkt_gen
diff options
context:
space:
mode:
authorMaryam Tahhan <maryam.tahhan@intel.com>2016-06-22 10:56:50 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-06-22 10:56:50 +0000
commitbb1323f26bb6e6cafd392727c066f3919215a20f (patch)
tree78b8faa0692e2a0b98f5bfa2d4bab22ab42a7296 /tools/pkt_gen
parent4342a6d75ba508c90952cd9210cdd7f68022f5bc (diff)
parentabd9a04ce633307303098608d9444d13ea88dba8 (diff)
Merge "xena_bug: Fix throughput stats with bi-directional traffic"
Diffstat (limited to 'tools/pkt_gen')
-rwxr-xr-xtools/pkt_gen/xena/xena.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/pkt_gen/xena/xena.py b/tools/pkt_gen/xena/xena.py
index 99da4584..194de343 100755
--- a/tools/pkt_gen/xena/xena.py
+++ b/tools/pkt_gen/xena/xena.py
@@ -95,9 +95,11 @@ class Xena(ITrafficGenerator):
if test_type == 'Throughput':
results = OrderedDict()
results[ResultsConstants.THROUGHPUT_RX_FPS] = int(
- root[0][1][0][1].get('PortRxPps'))
- results[ResultsConstants.THROUGHPUT_RX_MBPS] = int(
- root[0][1][0][1].get('PortRxBpsL1')) / 1000000
+ root[0][1][0][0].get('PortRxPps')) + int(
+ root[0][1][0][1].get('PortRxPps'))
+ results[ResultsConstants.THROUGHPUT_RX_MBPS] = (int(
+ root[0][1][0][0].get('PortRxBpsL1')) + int(
+ root[0][1][0][1].get('PortRxBpsL1')))/ 1000000
results[ResultsConstants.THROUGHPUT_RX_PERCENT] = (
100 - int(root[0][1][0].get('TotalLossRatioPcnt'))) * float(
root[0][1][0].get('TotalTxRatePcnt'))/100