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
zzha zzha
OpenXG-RAN
Commits
5b9de9c1
Commit
5b9de9c1
authored
Nov 04, 2021
by
hardy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved source for rt stats analysis : from stdout to stat log files
parent
f64b884e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
24 deletions
+49
-24
ci-scripts/ran.py
ci-scripts/ran.py
+49
-24
No files found.
ci-scripts/ran.py
View file @
5b9de9c1
...
...
@@ -797,20 +797,6 @@ class RANManagement():
#NSA specific log markers
nsa_markers
=
{
'SgNBReleaseRequestAcknowledge'
:
[],
'FAILURE'
:
[],
'scgFailureInformationNR-r15'
:
[],
'SgNBReleaseRequest'
:
[]}
#the datalog config file has to be loaded
datalog_rt_stats_file
=
'datalog_rt_stats.yaml'
if
(
os
.
path
.
isfile
(
datalog_rt_stats_file
)):
yaml_file
=
datalog_rt_stats_file
elif
(
os
.
path
.
isfile
(
'ci-scripts/'
+
datalog_rt_stats_file
)):
yaml_file
=
'ci-scripts/'
+
datalog_rt_stats_file
else
:
logging
.
error
(
"Datalog RT stats yaml file cannot be found"
)
sys
.
exit
(
"Datalog RT stats yaml file cannot be found"
)
with
open
(
yaml_file
,
'r'
)
as
f
:
datalog_rt_stats
=
yaml
.
load
(
f
,
Loader
=
yaml
.
FullLoader
)
rt_keys
=
datalog_rt_stats
[
'Ref'
]
#we use the keys from the Ref field
line_cnt
=
0
#log file line counter
for
line
in
enb_log_file
.
readlines
():
line_cnt
+=
1
...
...
@@ -977,15 +963,7 @@ class RANManagement():
if
result
is
not
None
:
#remove 1- all useless char before relevant info (ulsch or dlsch) 2- trailing char
dlsch_ulsch_stats
[
k
]
=
re
.
sub
(
r'^.*\]\s+'
,
r''
,
line
.
rstrip
())
#real time statistics for gNB
for
k
in
rt_keys
:
result
=
re
.
search
(
k
,
line
)
if
result
is
not
None
:
#remove 1- all useless char before relevant info 2- trailing char
line
=
line
.
replace
(
'[0m'
,
''
)
tmp
=
re
.
match
(
rf'^.*?(\b
{
k
}
\b.*)'
,
line
.
rstrip
())
#from python 3.6 we can use literal string interpolation for the variable k, using rf' in the regex
if
tmp
!=
None
:
#with ULULULUULULULLLL at the head of the line, we skip it
real_time_stats
[
k
]
=
tmp
.
group
(
1
)
#count "problem receiving samples" msg
result
=
re
.
search
(
'\[PHY\]\s+problem receiving samples'
,
str
(
line
))
...
...
@@ -1006,7 +984,54 @@ class RANManagement():
nsa_markers
[
k
].
append
(
line_cnt
)
enb_log_file
.
close
()
logging
.
debug
(
' File analysis completed'
)
#the following part takes the *_stats.log files as source (not the stdout log file)
#the datalog config file has to be loaded
datalog_rt_stats_file
=
'datalog_rt_stats.yaml'
if
(
os
.
path
.
isfile
(
datalog_rt_stats_file
)):
yaml_file
=
datalog_rt_stats_file
elif
(
os
.
path
.
isfile
(
'ci-scripts/'
+
datalog_rt_stats_file
)):
yaml_file
=
'ci-scripts/'
+
datalog_rt_stats_file
else
:
logging
.
error
(
"Datalog RT stats yaml file cannot be found"
)
sys
.
exit
(
"Datalog RT stats yaml file cannot be found"
)
with
open
(
yaml_file
,
'r'
)
as
f
:
datalog_rt_stats
=
yaml
.
load
(
f
,
Loader
=
yaml
.
FullLoader
)
rt_keys
=
datalog_rt_stats
[
'Ref'
]
#we use the keys from the Ref field
if
(
os
.
path
.
isfile
(
'./nrL1_stats.log'
))
and
(
os
.
path
.
isfile
(
'./nrL1_stats.log'
)):
stat_files_present
=
True
else
:
logging
.
debug
(
"NR Stats files for RT analysis not found"
)
if
stat_files_present
:
nrL1_stat
=
open
(
'./nrL1_stats.log'
,
'r'
)
nrMAC_stat
=
open
(
'./nrMAC_stats.log'
,
'r'
)
for
line
in
nrL1_stat
.
readlines
():
for
k
in
rt_keys
:
result
=
re
.
search
(
k
,
line
)
if
result
is
not
None
:
#remove 1- all useless char before relevant info 2- trailing char
tmp
=
re
.
match
(
rf'^.*?(\b
{
k
}
\b.*)'
,
line
.
rstrip
())
#from python 3.6 we can use literal string interpolation for the variable k, using rf' in the regex
if
tmp
!=
None
:
real_time_stats
[
k
]
=
tmp
.
group
(
1
)
for
line
in
nrMAC_stat
.
readlines
():
for
k
in
rt_keys
:
result
=
re
.
search
(
k
,
line
)
if
result
is
not
None
:
#remove 1- all useless char before relevant info 2- trailing char
tmp
=
re
.
match
(
rf'^.*?(\b
{
k
}
\b.*)'
,
line
.
rstrip
())
#from python 3.6 we can use literal string interpolation for the variable k, using rf' in the regex
if
tmp
!=
None
:
real_time_stats
[
k
]
=
tmp
.
group
(
1
)
nrL1_stats
.
close
()
nrMAC_stats
.
close
()
#stdout log file and stat log files analysis completed
logging
.
debug
(
' File analysis (stdout, stats) completed'
)
#post processing depending on the node type
if
(
self
.
air_interface
[
self
.
eNB_instance
]
==
'lte-softmodem'
)
or
(
self
.
air_interface
[
self
.
eNB_instance
]
==
'ocp-enb'
):
nodeB_prefix
=
'e'
else
:
...
...
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