From: DanielMartinBuckley Date: Fri, 13 Oct 2017 10:34:49 +0000 (+0100) Subject: BugFix: Fix to negative dropped packets appearing in results. X-Git-Tag: opnfv-6.0.0~331^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=4dc75ed6cfe14f24fd91122da52bc9a9168e84c0;p=yardstick.git BugFix: Fix to negative dropped packets appearing in results. 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 --- diff --git a/yardstick/network_services/vnf_generic/vnf/prox_vnf.py b/yardstick/network_services/vnf_generic/vnf/prox_vnf.py index 3bfca19aa..24712dd27 100644 --- a/yardstick/network_services/vnf_generic/vnf/prox_vnf.py +++ b/yardstick/network_services/vnf_generic/vnf/prox_vnf.py @@ -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