From 3d14c60db72806048d6c345a92c7c715d6457daa Mon Sep 17 00:00:00 2001 From: Radek Zetik Date: Wed, 3 Feb 2016 11:28:51 +0000 Subject: VSPERF: Report percentage frameloss from IXIA/IXNET The patch introduces frame_loss_percent result value. The implementation is done for Ixia and IxNet traffic generators. The value is visible in list of result values at the end of the test, in csv, rst and md files. JIRA: VSPERF-201 Change-Id: I9b6795d427b199cb62ed66b7a137e412e36dc757 Signed-off-by: Radek Zetik Reviewed-by: Maryam Tahhan Reviewed-by: Brian Castelli Reviewed-by: Al Morton Reviewed-by: Tv Rao Reviewed-by: Billy O Mahony --- tools/pkt_gen/ixia/ixia.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools/pkt_gen/ixia') diff --git a/tools/pkt_gen/ixia/ixia.py b/tools/pkt_gen/ixia/ixia.py index 10ed1fb2..b9b3dd17 100755 --- a/tools/pkt_gen/ixia/ixia.py +++ b/tools/pkt_gen/ixia/ixia.py @@ -289,6 +289,10 @@ class Ixia(trafficgen.ITrafficGenerator): """ assert len(result) == 8 # fail-fast if underlying Tcl code changes + if float(result[0]) == 0: + loss_rate = 100 + else: + loss_rate = (float(result[0]) - float(result[1])) / float(result[0]) * 100 result_dict = OrderedDict() # drop the first 4 elements as we don't use/need them. In # addition, IxExplorer does not support latency or % line rate @@ -297,6 +301,7 @@ class Ixia(trafficgen.ITrafficGenerator): result_dict[ResultsConstants.TX_RATE_FPS] = result[5] result_dict[ResultsConstants.THROUGHPUT_RX_MBPS] = result[6] result_dict[ResultsConstants.TX_RATE_MBPS] = result[7] + result_dict[ResultsConstants.FRAME_LOSS_PERCENT] = loss_rate result_dict[ResultsConstants.TX_RATE_PERCENT] = \ ResultsConstants.UNKNOWN_VALUE result_dict[ResultsConstants.THROUGHPUT_RX_PERCENT] = \ -- cgit 1.2.3-korg