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
This commit is contained in:
Andre Puschmann 2020-08-27 15:34:04 +02:00
parent 0cfc08436d
commit 9bcbb9aea7
1 changed files with 2 additions and 0 deletions

View File

@ -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'))