Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
ZhouShuya
OpenXG-RAN
Commits
22a20f93
Commit
22a20f93
authored
Apr 26, 2021
by
hardy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix an error case where keys are missing
parent
0654f3fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
ci-scripts/cls_rt_monitor.py
ci-scripts/cls_rt_monitor.py
+12
-8
ci-scripts/ran.py
ci-scripts/ran.py
+1
-0
No files found.
ci-scripts/cls_rt_monitor.py
View file @
22a20f93
...
...
@@ -161,6 +161,7 @@ def build_RT_Row(Branch,Commit,keys,filename):
row
.
append
(
Branch
)
row
.
append
(
Commit
)
#parsing the log file
real_time_stats
=
{}
f
=
open
(
filename
,
"r"
)
for
line
in
f
.
readlines
():
...
...
@@ -171,14 +172,17 @@ def build_RT_Row(Branch,Commit,keys,filename):
real_time_stats
[
k
]
=
tmp
.
group
(
1
)
f
.
close
()
for
k
in
keys
:
tmp
=
re
.
match
(
r'^(?P<metric>.*):\s+(?P<avg>\d+\.\d+) us;\s+\d+;\s+(?P<max>\d+\.\d+) us;'
,
real_time_stats
[
k
])
if
tmp
is
not
None
:
metric
=
tmp
.
group
(
'metric'
)
avg
=
tmp
.
group
(
'avg'
)
max
=
tmp
.
group
(
'max'
)
row
.
append
(
float
(
avg
))
row
.
append
(
float
(
max
))
#parsing the dictionary with the keys we are looking for
#dict may be empty if no data found above
if
len
(
real_time_stats
)
!=
0
:
for
k
in
keys
:
tmp
=
re
.
match
(
r'^(?P<metric>.*):\s+(?P<avg>\d+\.\d+) us;\s+\d+;\s+(?P<max>\d+\.\d+) us;'
,
real_time_stats
[
k
])
if
tmp
is
not
None
:
metric
=
tmp
.
group
(
'metric'
)
avg
=
tmp
.
group
(
'avg'
)
max
=
tmp
.
group
(
'max'
)
row
.
append
(
float
(
avg
))
row
.
append
(
float
(
max
))
if
len
(
row
)
==
3
:
#if row was not updated (missing data for ex), then return an empty row
row
=
[]
...
...
ci-scripts/ran.py
View file @
22a20f93
...
...
@@ -934,6 +934,7 @@ class RANManagement():
htmleNBFailureMsg
+=
statMsg
#data log of gNB rela time stats
#attention this leads to reading the log file a second time, not very efficient
import
cls_rt_monitor
#import here (rather than on top) is to avoid installing the libs onto 4G bench servers, possibly temporary solution
cls_rt_monitor
.
gNB_RT_monitor
(
self
.
ranBranch
,
self
.
ranCommitID
,
eNBlogFile
)
...
...
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