Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bin He
openairinterface5G
Commits
e9df8888
Commit
e9df8888
authored
Apr 15, 2021
by
hardy
Browse files
adding real time stats from log to HTML
parent
875e2906
Changes
1
Hide whitespace changes
Inline
Side-by-side
ci-scripts/ran.py
View file @
e9df8888
...
...
@@ -694,6 +694,8 @@ class RANManagement():
NSA_RAPROC_PUSCH_check
=
0
#dlsch and ulsch statistics (dictionary)
dlsch_ulsch_stats
=
{}
#real time statistics (dictionary)
real_time_stats
=
{}
#count "L1 thread not ready" msg
L1_thread_not_ready_cnt
=
0
#count "problem receiving samples" msg
...
...
@@ -863,6 +865,17 @@ 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
#same method as above
keys
=
{
'feprx'
,
'feptx_prec'
,
'feptx_ofdm'
,
'feptx_total'
,
'L1 Tx processing'
,
'DLSCH encoding'
,
'L1 Rx processing'
,
'PUSCH inner-receiver'
,
'PUSCH decoding'
}
for
k
in
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
real_time_stats
[
k
]
=
tmp
.
group
(
1
)
#count "L1 thread not ready" msg
result
=
re
.
search
(
'\[PHY\]\s+L1_thread isn
\'
t ready'
,
str
(
line
))
if
result
is
not
None
:
...
...
@@ -920,6 +933,14 @@ class RANManagement():
logging
.
debug
(
dlsch_ulsch_stats
[
key
])
htmleNBFailureMsg
+=
statMsg
#real time statistics statistics
if
len
(
real_time_stats
)
!=
0
:
#check if dictionary is not empty
statMsg
=
''
for
key
in
real_time_stats
:
#for each dictionary key
statMsg
+=
real_time_stats
[
key
]
+
'
\n
'
logging
.
debug
(
real_time_stats
[
key
])
htmleNBFailureMsg
+=
statMsg
if
uciStatMsgCount
>
0
:
statMsg
=
nodeB_prefix
+
'NB showed '
+
str
(
uciStatMsgCount
)
+
' "uci->stat" message(s)'
logging
.
debug
(
'
\u001B
[1;30;43m '
+
statMsg
+
'
\u001B
[0m'
)
...
...
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