trex_stat_packet_counts: Add packet counts to trex reporting 23/47523/1
authorChristian Trautman <ctrautma@redhat.com>
Mon, 20 Nov 2017 17:11:15 +0000 (12:11 -0500)
committerChristian Trautman <ctrautma@redhat.com>
Mon, 20 Nov 2017 17:11:15 +0000 (12:11 -0500)
Adds packet count totals for transmit and receive to reporting
at the end of test execution.

JIRA: VSPERF-546

Change-Id: I51027fae109d0ea794c0db03f5781ddb2fcbb941
Signed-off-by: Christian Trautman <ctrautma@redhat.com>
tools/pkt_gen/trex/trex.py

index 70864a5..acdaf28 100644 (file)
@@ -273,6 +273,10 @@ class Trex(ITrafficGenerator):
         """Calculate results from Trex statistic
         """
         result = OrderedDict()
+        result[ResultsConstants.TX_FRAMES] = (
+            stats["total"]["opackets"])
+        result[ResultsConstants.RX_FRAMES] = (
+            stats["total"]["ipackets"])
         result[ResultsConstants.TX_RATE_FPS] = (
             '{:.3f}'.format(
                 float(stats["total"]["tx_pps"])))