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
4a263215
Commit
4a263215
authored
Jan 03, 2022
by
hardy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add ping events graph into artifacts as png
parent
76f09903
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
ci-scripts/cls_oaicitest.py
ci-scripts/cls_oaicitest.py
+20
-2
No files found.
ci-scripts/cls_oaicitest.py
View file @
4a263215
...
...
@@ -62,7 +62,7 @@ import cls_ci_ueinfra #class defining the multi Ue infrastrucure
# Utility functions
#-----------------------------------------------------------
def
GetPingTimeAnalysis
(
ping_log_file
):
def
GetPingTimeAnalysis
(
ping_log_file
,
ping_rttavg_threshold
):
#ping time values read from file
t_ping
=
[]
#ping stats (dictionary) to be returned by the function
...
...
@@ -93,6 +93,24 @@ def GetPingTimeAnalysis(ping_log_file):
ping_stat
[
'median_1'
]
=
stat
.
median
(
t_ping
)
ping_stat
[
'max_1'
]
=
max
(
t_ping
)
#plot ping over time and save png for artifacts
ticks
=
np
.
arange
(
0
,
len
(
t_ping
),
1
)
figure
,
axis
=
plt
.
subplots
(
figsize
=
(
10
,
10
))
axis
.
plot
(
ticks
,
t_ping
,
marker
=
'o'
)
axis
.
set_xlabel
(
'Ping Events'
)
axis
.
set_ylabel
(
"Ping RTT (in ms)"
)
axis
.
set_title
(
ping_log_file
)
YMAX
=
20
#base scale
if
max
(
t_ping
)
>
YMAX
:
y_max
=
max
(
t_ping
)
+
1
else
:
y_max
=
YMAX
+
1
plt
.
ylim
(
0
,
y_max
)
th_label
=
"Ping Fail Threshold="
+
ping_rttavg_threshold
plt
.
axhline
(
y
=
float
(
ping_rttavg_threshold
),
color
=
'r'
,
linestyle
=
'-'
,
label
=
th_label
)
axis
.
legend
()
plt
.
savefig
(
ping_log_file
+
'.png'
)
return
ping_stat
else
:
...
...
@@ -1647,7 +1665,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
)
ping_stat
=
GetPingTimeAnalysis
(
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
'
...
...
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