BugFix: Fix to negative dropped packets appearing in results. 57/45657/1
authorDanielMartinBuckley <daniel.m.buckley@intel.com>
Fri, 13 Oct 2017 10:34:49 +0000 (11:34 +0100)
committerRoss Brattain <ross.b.brattain@intel.com>
Thu, 19 Oct 2017 00:07:19 +0000 (17:07 -0700)
As per defect:
   the "VNF packets dropped" time series is negative - negative number of packets dropped
   is not meaningful.

Solution:
   Return a positive value.

Change-Id: I358006a691f2d6b5954333b9f7a745aba97ae44f
Signed-off-by: Daniel Martin Buckley <daniel.m.buckley@intel.com>
yardstick/network_services/vnf_generic/vnf/prox_vnf.py

index 3bfca19..24712dd 100644 (file)
@@ -90,7 +90,7 @@ class ProxApproxVnf(SampleVNF):
 
         result = {
             "packets_in": tx_total,
-            "packets_dropped": (tx_total - rx_total),
+            "packets_dropped": abs(rx_total - tx_total),
             "packets_fwd": rx_total,
             # we share ProxResourceHelper with TG, but we want to collect
             # collectd KPIs here and not TG KPIs, so use a different method name