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
Michael Black
OpenXG-RAN
Commits
28e37684
Commit
28e37684
authored
Aug 19, 2020
by
hardy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding runtime stats to console and HTML when Terminate_UE
parent
eddf218d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
14 deletions
+22
-14
ci-scripts/cls_cots_ue.py
ci-scripts/cls_cots_ue.py
+4
-2
ci-scripts/ran.py
ci-scripts/ran.py
+18
-12
No files found.
ci-scripts/cls_cots_ue.py
View file @
28e37684
...
...
@@ -43,6 +43,7 @@ class CotsUe:
self
.
ADBUserName
=
ADBUserName
self
.
ADBPassWord
=
ADBPassWord
self
.
cots_run_mode
=
''
#on of off to toggle airplane mode on/off
self
.
__cots_cde_dict_file
=
'cots_ue_ctl.yaml'
self
.
__SetAirplaneRetry
=
3
#-----------------$
...
...
@@ -59,7 +60,7 @@ class CotsUe:
def
Set_Airplane
(
self
,
target_id
,
target_state_str
):
#load cots commands dictionary
with
open
(
'cots_ue_ctl.yaml'
,
'r'
)
as
file
:
with
open
(
self
.
__cots_cde_dict_file
,
'r'
)
as
file
:
cots_ue_ctl
=
yaml
.
load
(
file
,
Loader
=
yaml
.
FullLoader
)
if
target_id
in
cots_ue_ctl
:
mySSH
=
sshconnection
.
SSHConnection
()
...
...
@@ -89,7 +90,8 @@ class CotsUe:
mySSH
.
command
(
'sudo adb kill-server'
,
'$'
,
5
)
mySSH
.
close
()
else
:
logging
.
error
(
"COTS UE Id from XML could not be found in UE YAML dictionary cots_ue_ctl.yaml)
logging
.
error
(
"COTS UE Id from XML could not be found in UE YAML dictionary "
+
self
.
__cots_cde_dict_file
)
sys
.
exit
(
"COTS UE Id from XML could not be found in UE YAML dictionary "
+
self
.
__cots_cde_dict_file
)
...
...
ci-scripts/ran.py
View file @
28e37684
...
...
@@ -90,6 +90,7 @@ class RANManagement():
self
.
epcPcapFile
=
''
self
.
htmlObj
=
None
self
.
epcObj
=
None
self
.
runtime_stats
=
''
...
...
@@ -614,7 +615,7 @@ class RANManagement():
logging
.
debug
(
'
\u001B
[1m Analyzing eNB replay logfile
\u001B
[0m'
)
logStatus
=
self
.
AnalyzeLogFile_eNB
(
extracted_log_file
)
if
self
.
htmlObj
is
not
None
:
self
.
htmlObj
.
CreateHtmlTestRow
(
'N/A'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
self
.
htmlObj
.
CreateHtmlTestRow
(
self
.
runtime_stats
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
self
.
eNBLogFiles
[
int
(
self
.
eNB_instance
)]
=
''
else
:
analyzeFile
=
False
...
...
@@ -643,10 +644,10 @@ class RANManagement():
return
else
:
if
self
.
htmlObj
is
not
None
:
self
.
htmlObj
.
CreateHtmlTestRow
(
'N/A'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
self
.
htmlObj
.
CreateHtmlTestRow
(
self
.
runtime_stats
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
else
:
if
self
.
htmlObj
is
not
None
:
self
.
htmlObj
.
CreateHtmlTestRow
(
'N/A'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
self
.
htmlObj
.
CreateHtmlTestRow
(
self
.
runtime_stats
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
self
.
eNBmbmsEnables
[
int
(
self
.
eNB_instance
)]
=
False
self
.
eNBstatuses
[
int
(
self
.
eNB_instance
)]
=
-
1
...
...
@@ -712,16 +713,20 @@ class RANManagement():
if
runTime
!=
''
:
result
=
re
.
search
(
'Time executing user inst'
,
str
(
line
))
if
result
is
not
None
:
userTime
=
'to be decoded - 1'
fields
=
line
.
split
(
':'
)
userTime
=
'userTime : '
+
fields
[
1
].
replace
(
'
\n
'
,
''
)
result
=
re
.
search
(
'Time executing system inst'
,
str
(
line
))
if
result
is
not
None
:
systemTime
=
'to be decoded - 2'
fields
=
line
.
split
(
':'
)
systemTime
=
'systemTime : '
+
fields
[
1
].
replace
(
'
\n
'
,
''
)
result
=
re
.
search
(
'Max. Phy. memory usage:'
,
str
(
line
))
if
result
is
not
None
:
maxPhyMemUsage
=
'to be decoded - 3'
fields
=
line
.
split
(
':'
)
maxPhyMemUsage
=
'maxPhyMemUsage : '
+
fields
[
1
].
replace
(
'
\n
'
,
''
)
result
=
re
.
search
(
'Number of context switch.*process origin'
,
str
(
line
))
if
result
is
not
None
:
nbContextSwitches
=
'to be decoded - 4'
fields
=
line
.
split
(
':'
)
nbContextSwitches
=
'nbContextSwitches : '
+
fields
[
1
].
replace
(
'
\n
'
,
''
)
if
X2HO_state
==
CONST
.
X2_HO_REQ_STATE__IDLE
:
result
=
re
.
search
(
'target eNB Receives X2 HO Req X2AP_HANDOVER_REQ'
,
str
(
line
))
if
result
is
not
None
:
...
...
@@ -978,11 +983,12 @@ class RANManagement():
global_status
=
CONST
.
ENB_PROCESS_REALTIME_ISSUE
if
self
.
htmlObj
is
not
None
:
self
.
htmlObj
.
htmleNBFailureMsg
=
htmleNBFailureMsg
# Runtime statistics
# Runtime statistics
for console output and HTML
if
runTime
!=
''
:
logging
.
debug
(
runTime
)
logging
.
debug
(
'Time executing user inst : '
+
userTime
)
logging
.
debug
(
'Time executing system inst : '
+
systemTime
)
logging
.
debug
(
'Max Physical Memory Usage : '
+
maxPhyMemUsage
)
logging
.
debug
(
'Nb Context Switches : '
+
nbContextSwitches
)
logging
.
debug
(
userTime
)
logging
.
debug
(
systemTime
)
logging
.
debug
(
maxPhyMemUsage
)
logging
.
debug
(
nbContextSwitches
)
self
.
runtime_stats
=
runTime
+
'
\n
'
+
userTime
+
'
\n
'
+
systemTime
+
'
\n
'
+
maxPhyMemUsage
+
'
\n
'
+
nbContextSwitches
return
global_status
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