aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo_gsm_tester
diff options
context:
space:
mode:
authorAndre Puschmann <andre@softwareradiosystems.com>2020-08-27 15:34:04 +0200
committerAndre Puschmann <andre@softwareradiosystems.com>2020-08-27 15:37:54 +0200
commit9bcbb9aea77f944b87ba098123e6b15f5d029992 (patch)
treec46e300a9306c35917f1688e8e0e0513bfeee6af /src/osmo_gsm_tester
parent0cfc08436dafa5e37eef91b6f7e4fe50b5a08035 (diff)
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
Diffstat (limited to 'src/osmo_gsm_tester')
-rw-r--r--src/osmo_gsm_tester/obj/ms_srs.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/osmo_gsm_tester/obj/ms_srs.py b/src/osmo_gsm_tester/obj/ms_srs.py
index 124b113..1c0f728 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'))