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
90f150a4
Commit
90f150a4
authored
Dec 21, 2021
by
hardy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve iperf pass fail checker
parent
3ea34db9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
+20
-3
ci-scripts/cls_oaicitest.py
ci-scripts/cls_oaicitest.py
+13
-3
ci-scripts/main.py
ci-scripts/main.py
+7
-0
No files found.
ci-scripts/cls_oaicitest.py
View file @
90f150a4
...
...
@@ -129,6 +129,7 @@ class OaiCiTest():
self
.
ping_rttavg_threshold
=
''
self
.
iperf_args
=
''
self
.
iperf_packetloss_threshold
=
''
self
.
iperf_bitrate_threshold
=
''
self
.
iperf_profile
=
''
self
.
iperf_options
=
''
self
.
iperf_direction
=
''
...
...
@@ -2085,13 +2086,21 @@ class OaiCiTest():
pl
=
float
(
100
*
pl_sum
/
ps_sum
)
packetloss
=
'%2.1f '
%
(
pl
)
packetloss
+=
'%'
#checking packet loss compliance
if
float
(
pl
)
>
float
(
self
.
iperf_packetloss_threshold
):
pal_too_high_msg
=
'Packet Loss too high : actual = '
+
packetloss
+
', target = '
+
self
.
iperf_packetloss_threshold
+
'%
\n
'
else
:
pal_too_high_msg
=
''
#checking bitrate perf compliance
if
float
(
br_loss
)
<
float
(
self
.
iperf_bitrate_threshold
):
bit_too_low_msg
=
'Bitrate too low : actual = '
+
bitperf
+
', target = '
+
self
.
iperf_bitrate_threshold
+
'%
\n
'
else
:
bit_too_low_msg
=
''
lock
.
acquire
()
if
(
br_loss
<
90
)
or
(
float
(
pl
)
>
float
(
self
.
iperf_packetloss_threshold
)):
if
(
br_loss
<
self
.
iperf_bitrate_threshold
)
or
(
float
(
pl
)
>
float
(
self
.
iperf_packetloss_threshold
)):
statusQueue
.
put
(
1
)
elif
(
br_loss
<
self
.
iperf_bitrate_threshold
)
and
(
float
(
pl
)
>
float
(
self
.
iperf_packetloss_threshold
)):
statusQueue
.
put
(
-
1
)
else
:
statusQueue
.
put
(
0
)
statusQueue
.
put
(
device_id
)
...
...
@@ -2101,7 +2110,7 @@ class OaiCiTest():
brl_msg
=
'Bitrate Perf: '
+
bitperf
jit_msg
=
'Jitter : '
+
jitter
pal_msg
=
'Packet Loss : '
+
packetloss
statusQueue
.
put
(
req_msg
+
'
\n
'
+
bir_msg
+
'
\n
'
+
brl_msg
+
'
\n
'
+
jit_msg
+
'
\n
'
+
pal_msg
+
'
\n
'
+
pal_too_high_msg
+
'
\n
'
)
statusQueue
.
put
(
req_msg
+
'
\n
'
+
bir_msg
+
'
\n
'
+
brl_msg
+
'
\n
'
+
jit_msg
+
'
\n
'
+
pal_msg
+
'
\n
'
+
pal_too_high_msg
+
'
\n
'
+
bit_too_low_msg
+
'
\n
'
)
logging
.
debug
(
'
\u001B
[1;37;45m iperf result ('
+
UE_IPAddress
+
')
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;35m '
+
req_msg
+
'
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;35m '
+
bir_msg
+
'
\u001B
[0m'
)
...
...
@@ -2109,6 +2118,7 @@ class OaiCiTest():
logging
.
debug
(
'
\u001B
[1;35m '
+
jit_msg
+
'
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;35m '
+
pal_msg
+
'
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;35m '
+
pal_too_high_msg
+
'
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;35m '
+
bit_too_low_msg
+
'
\u001B
[0m'
)
lock
.
release
()
else
:
self
.
ping_iperf_wrong_exit
(
lock
,
UE_IPAddress
,
device_id
,
statusQueue
,
'Could not analyze from server log'
)
...
...
ci-scripts/main.py
View file @
90f150a4
...
...
@@ -310,6 +310,13 @@ def GetParametersFromXML(action):
CiTestObj
.
ue_id
=
ue_id
CiTestObj
.
iperf_direction
=
test
.
findtext
(
'direction'
)
#used for modules only
CiTestObj
.
iperf_packetloss_threshold
=
test
.
findtext
(
'iperf_packetloss_threshold'
)
iperf_bitrate_threshold
=
test
.
findtext
(
'iperf_bitrate_threshold'
)
if
(
iperf_bitrate_threshold
is
None
):
CiTestObj
.
iperf_bitrate_threshold
=
"90"
#if no threshold is specified, default will be 90%
else
:
CiTestObj
.
iperf_bitrate_threshold
=
iperf_bitrate_threshold
CiTestObj
.
iperf_profile
=
test
.
findtext
(
'iperf_profile'
)
if
(
CiTestObj
.
iperf_profile
is
None
):
CiTestObj
.
iperf_profile
=
'balanced'
...
...
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