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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
02a1b883
Commit
02a1b883
authored
Jan 04, 2022
by
hardy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix copy of ping graph
parent
87a26948
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
ci-scripts/cls_oaicitest.py
ci-scripts/cls_oaicitest.py
+11
-10
No files found.
ci-scripts/cls_oaicitest.py
View file @
02a1b883
...
...
@@ -65,7 +65,7 @@ import numpy as np
# Utility functions
#-----------------------------------------------------------
def
GetPingTimeAnalysis
(
ping_log_file
,
ping_rttavg_threshold
):
def
GetPingTimeAnalysis
(
RAN
,
ping_log_file
,
ping_rttavg_threshold
):
#ping time values read from file
t_ping
=
[]
#ping stats (dictionary) to be returned by the function
...
...
@@ -89,12 +89,13 @@ def GetPingTimeAnalysis(ping_log_file,ping_rttavg_threshold):
max_loc
=
t_ping
.
index
(
max
(
t_ping
))
ping_stat
[
'max_loc'
]
=
max_loc
#remove it
t_ping
.
pop
(
max_loc
)
t_ping_post
=
t_ping
.
copy
()
t_ping_post
.
pop
(
max_loc
)
#new stats after removing max value
ping_stat
[
'min_1'
]
=
min
(
t_ping
)
ping_stat
[
'mean_1'
]
=
stat
.
mean
(
t_ping
)
ping_stat
[
'median_1'
]
=
stat
.
median
(
t_ping
)
ping_stat
[
'max_1'
]
=
max
(
t_ping
)
ping_stat
[
'min_1'
]
=
min
(
t_ping
_post
)
ping_stat
[
'mean_1'
]
=
stat
.
mean
(
t_ping
_post
)
ping_stat
[
'median_1'
]
=
stat
.
median
(
t_ping
_post
)
ping_stat
[
'max_1'
]
=
max
(
t_ping
_post
)
#plot ping over time and save png for artifacts
ticks
=
np
.
arange
(
0
,
len
(
t_ping
),
1
)
...
...
@@ -118,7 +119,7 @@ def GetPingTimeAnalysis(ping_log_file,ping_rttavg_threshold):
#copy the png file already to enb to move it move it later into the artifacts
mySSH
=
sshconnection
.
SSHConnection
()
mySSH
.
copyout
(
self
.
eNBIPAddress
,
self
.
eNBUserName
,
self
.
eNBPassword
,
ping_log_file
+
'.png'
,
self
.
eNBSourceCodePath
+
'/cmake_targets/'
)
mySSH
.
copyout
(
RAN
.
eNBIPAddress
,
RAN
.
eNBUserName
,
RAN
.
eNBPassword
,
ping_log_file
+
'.png'
,
RAN
.
eNBSourceCodePath
+
'/cmake_targets/'
)
return
ping_stat
...
...
@@ -1559,7 +1560,7 @@ class OaiCiTest():
statusQueue
.
put
(
message
)
lock
.
release
()
def
Ping_common
(
self
,
lock
,
UE_IPAddress
,
device_id
,
statusQueue
,
EPC
,
Module_UE
):
def
Ping_common
(
self
,
lock
,
UE_IPAddress
,
device_id
,
statusQueue
,
EPC
,
Module_UE
,
RAN
):
try
:
SSH
=
sshconnection
.
SSHConnection
()
# Launch ping on the EPC side (true for ltebox and old open-air-cn)
...
...
@@ -1674,7 +1675,7 @@ class OaiCiTest():
#adding extra ping stats from local file
#ping_log_file variable is defined above in this function, depending on device/ue
logging
.
debug
(
'Analyzing Ping log file : '
+
os
.
getcwd
()
+
'/'
+
ping_log_file
)
ping_stat
=
GetPingTimeAnalysis
(
ping_log_file
,
self
.
ping_rttavg_threshold
)
ping_stat
=
GetPingTimeAnalysis
(
RAN
,
ping_log_file
,
self
.
ping_rttavg_threshold
)
ping_stat_msg
=
''
if
(
ping_stat
!=-
1
)
and
(
len
(
ping_stat
)
!=
0
):
ping_stat_msg
+=
'Ping stats before removing largest value :
\n
'
...
...
@@ -1864,7 +1865,7 @@ class OaiCiTest():
device_id
=
self
.
UEDevices
[
i
]
else
:
device_id
=
Module_UE
.
ID
+
"-"
+
Module_UE
.
Kind
p
=
Process
(
target
=
self
.
Ping_common
,
args
=
(
lock
,
UE_IPAddress
,
device_id
,
status_queue
,
EPC
,
Module_UE
,))
p
=
Process
(
target
=
self
.
Ping_common
,
args
=
(
lock
,
UE_IPAddress
,
device_id
,
status_queue
,
EPC
,
Module_UE
,
RAN
,
))
p
.
daemon
=
True
p
.
start
()
multi_jobs
.
append
(
p
)
...
...
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