Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin-telecom
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Paul Graydon
wendelin-telecom
Commits
6b1151f7
Commit
6b1151f7
authored
Sep 18, 2024
by
Paul Graydon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wendelin_telecom_base: Improve KPI calculation error handling
parent
71d02c8d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
15 deletions
+18
-15
bt5/wendelin_telecom_base/ExtensionTemplateItem/portal_components/extension.erp5.OrsKpiUtils.py
...plateItem/portal_components/extension.erp5.OrsKpiUtils.py
+17
-9
bt5/wendelin_telecom_base/PathTemplateItem/portal_callables/DataAnalysisLine_calculateOrsKpi.py
...Item/portal_callables/DataAnalysisLine_calculateOrsKpi.py
+1
-6
No files found.
bt5/wendelin_telecom_base/ExtensionTemplateItem/portal_components/extension.erp5.OrsKpiUtils.py
View file @
6b1151f7
...
...
@@ -7,24 +7,32 @@ def load_measurements(alogm):
try
:
measurement
=
alogm
.
read
()
while
measurement
is
not
None
:
mlog
.
append
(
measurement
)
try
:
mlog
.
append
(
measurement
)
except
AssertionError
:
# Invalid measurement: simply skip it
pass
measurement
=
alogm
.
read
()
finally
:
alogm
.
close
()
return
mlog
def
calc_periods
(
mlog
,
tperiod
):
t
=
mlog
.
data
()[
0
][
'X.Tstart'
]
for
measurement
in
mlog
.
data
()[
1
:]:
t_
=
measurement
[
'X.Tstart'
]
if
(
t_
-
t
)
>=
tperiod
:
calc
=
kpi
.
Calc
(
mlog
,
t
,
t
+
tperiod
)
t
=
calc
.
tau_hi
yield
calc
try
:
t
=
mlog
.
data
()[
0
][
'X.Tstart'
]
for
measurement
in
mlog
.
data
()[
1
:]:
t_
=
measurement
[
'X.Tstart'
]
if
(
t_
-
t
)
>=
tperiod
:
calc
=
kpi
.
Calc
(
mlog
,
t
,
t
+
tperiod
)
t
=
calc
.
tau_hi
yield
calc
except
IndexError
:
# No data to read: exit
return
def
getOrsKpiValues
(
data
):
fxlog
=
io
.
StringIO
(
data
)
alogm
=
amari_kpi
.
LogMeasure
(
fxlog
,
open
(
'/dev/null'
,
'r'
))
alogm
=
amari_kpi
.
LogMeasure
(
fxlog
,
open
(
'/dev/null'
,
'r'
))
mlog
=
load_measurements
(
alogm
)
vt
=
[]
...
...
bt5/wendelin_telecom_base/PathTemplateItem/portal_callables/DataAnalysisLine_calculateOrsKpi.py
View file @
6b1151f7
...
...
@@ -37,12 +37,7 @@ for array in out_array:
if
array
[
'variation'
]
==
'e_utran'
:
e_utran_data_array
=
array
[
'Data Array'
]
try
:
vt
,
v_initial_epsb_estab_sr
,
v_added_epsb_estab_sr
,
evt
,
v_ip_throughput_qci
=
context
.
Base_getOrsKpiValues
(
log_data
)
except
AssertionError
:
# If some data is invalid: ignore data chunk and move on rather than crashing
progress_indicator
.
setIntOffsetIndex
(
end
)
return
vt
,
v_initial_epsb_estab_sr
,
v_added_epsb_estab_sr
,
evt
,
v_ip_throughput_qci
=
context
.
Base_getOrsKpiValues
(
log_data
)
e_rab_dtype
=
np
.
dtype
([
(
'vt'
,
'float'
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment