Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
streamPushPressure
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李远洪
streamPushPressure
Commits
32643254
Commit
32643254
authored
Dec 30, 2020
by
liyuanhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化了压力测试脚本
parent
d975ac0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
run.py
run.py
+3
-5
No files found.
run.py
View file @
32643254
...
...
@@ -47,11 +47,10 @@ def getPressTestObj():
def
flvFilePushTest
():
isLoop
=
1
# 是否循环压力测试 0: 不循环 1:循环
loopTime
=
1
*
60
*
60
# 循环压力测试的时长
test
=
getPressTestObj
()
logger
.
info
(
"-----------------------------启动新一轮压力测试-----------------------------"
)
threadInfo
=
test
.
getThreadInfo
()
threadInfoPull
=
test
.
getThreadInfoPull
()
logger
.
info
(
"剩余推流线程:"
+
str
(
len
(
threadInfo
[
"threadObj"
])))
logger
.
info
(
"剩余拉流线程:"
+
str
(
len
(
threadInfoPull
[
"threadObj"
])))
if
isLoop
==
0
:
...
...
@@ -62,10 +61,9 @@ def flvFilePushTest():
threadInfo
=
test
.
getThreadInfo
()
threadInfoPull
=
test
.
getThreadInfoPull
()
else
:
time
.
sleep
(
1
0
)
time
.
sleep
(
3
0
)
if
len
(
threadInfo
[
"threadObj"
])
==
0
and
len
(
threadInfoPull
[
"threadObj"
])
==
0
:
test
=
getPressTestObj
()
logger
.
info
(
"-----------------------------启动新一轮压力测试-----------------------------"
)
threadInfo
=
test
.
getThreadInfo
()
threadInfoPull
=
test
.
getThreadInfoPull
()
while
len
(
threadInfo
[
"threadObj"
])
!=
0
and
len
(
threadInfoPull
[
"threadObj"
])
!=
0
:
...
...
@@ -76,7 +74,7 @@ def flvFilePushTest():
threadInfoPull
=
test
.
getThreadInfoPull
()
flvFilePushTest
()
logger
.
info
(
"压力测试结束"
)
logger
.
info
(
"压力测试结束
!!!!!!
"
)
if
__name__
==
"__main__"
:
...
...
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