From abd9a04ce633307303098608d9444d13ea88dba8 Mon Sep 17 00:00:00 2001 From: Christian Trautman Date: Fri, 27 May 2016 14:18:37 -0400 Subject: xena_bug: Fix throughput stats with bi-directional traffic Fix xena throughput stats for bi directional traffic by taking the receive numbers from both ports instead of a single port. JIRA: VSPERF-303 Change-Id: I3898afe00f8c80f54e5b4c210831e1fc6cef3c20 Signed-off-by: Christian Trautman --- tools/pkt_gen/xena/xena.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tools/pkt_gen') diff --git a/tools/pkt_gen/xena/xena.py b/tools/pkt_gen/xena/xena.py index d29fc362..df28c8de 100755 --- a/tools/pkt_gen/xena/xena.py +++ b/tools/pkt_gen/xena/xena.py @@ -81,9 +81,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 -- cgit 1.2.3-korg