From 9bcbb9aea77f944b87ba098123e6b15f5d029992 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Thu, 27 Aug 2020 15:34:04 +0200 Subject: [PATCH] ms_srs: trim leading zeros in UE metrics when calculating min_rolling_avg this avoids a false negative detection when the UE attach takes a bit longer and the first seconds all zeros are reported in the CSV the HO test, for example, would fail in such a case as it expects no zero TP over the course of the experiment. Change-Id: I96dab17bb19249504dedda6659aed5eac0a65a26 --- src/osmo_gsm_tester/obj/ms_srs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/osmo_gsm_tester/obj/ms_srs.py b/src/osmo_gsm_tester/obj/ms_srs.py index 124b1131..1c0f7288 100644 --- a/src/osmo_gsm_tester/obj/ms_srs.py +++ b/src/osmo_gsm_tester/obj/ms_srs.py @@ -460,6 +460,8 @@ class srsUEMetrics(log.Origin): # calculate rolling average over window and take maximum value result = numpy.amax(numpy.convolve(sel_data, numpy.ones((window,))/window, mode='valid')) elif operation == 'min_rolling_avg': + # trim leading zeros to avoid false negative when UE attach takes longer + sel_data = numpy.trim_zeros(sel_data, 'f') # calculate rolling average over window and take minimum value result = numpy.amin(numpy.convolve(sel_data, numpy.ones((window,))/window, mode='valid'))