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
spbro
OpenXG-RAN
Commits
c4a3f569
Commit
c4a3f569
authored
Jan 31, 2022
by
hardy
Committed by
Robert Schmidt
Feb 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix stats logs concatenation
parent
50e7f379
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
ci-scripts/stats_monitor.py
ci-scripts/stats_monitor.py
+8
-9
No files found.
ci-scripts/stats_monitor.py
View file @
c4a3f569
...
...
@@ -60,18 +60,17 @@ class StatMonitor():
self
.
d
[
node_type
][
'mcs'
].
append
(
int
(
result
.
group
(
4
)))
def
collect
(
self
,
node_type
):
def
collect
(
self
,
testcase_id
,
node_type
):
if
node_type
==
'enb'
:
files
=
[
"L1_stats.log"
,
"MAC_stats.log"
,
"PDCP_stats.log"
,
"RRC_stats.log"
]
else
:
#'gnb'
files
=
[
"nrL1_stats.log"
,
"nrMAC_stats.log"
,
"nrPDCP_stats.log"
,
"nrRRC_stats.log"
]
# append each file's contents to another file (prepended with CI-) for
# post-mortem/debugging analysis
#for f in files:
# cmd = 'cat '+ f + ' >> CI-' + f
# if os.path.isfile(f):
# subprocess.Popen(cmd,shell=True)
# join the files for further processing
#append each file's contents to another file (prepended with CI-) for debug
for
f
in
files
:
if
os
.
path
.
isfile
(
f
):
cmd
=
'cat '
+
f
+
' >> CI-'
+
testcase_id
+
'-'
+
f
subprocess
.
Popen
(
cmd
,
shell
=
True
)
#join the files for further processing
cmd
=
'cat '
for
f
in
files
:
if
os
.
path
.
isfile
(
f
):
...
...
@@ -130,7 +129,7 @@ if __name__ == "__main__":
process
=
subprocess
.
Popen
(
CMD
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
)
output
=
process
.
stdout
.
readlines
()
while
len
(
output
)
!=
0
:
mon
.
collect
(
node
)
mon
.
collect
(
testcase_id
,
node
)
process
=
subprocess
.
Popen
(
CMD
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
)
output
=
process
.
stdout
.
readlines
()
time
.
sleep
(
1
)
...
...
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