Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
envsetup
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mediaserver
envsetup
Commits
c0a40a77
Commit
c0a40a77
authored
4 years ago
by
Antoine Schildknecht
Browse files
Options
Downloads
Patches
Plain Diff
Fix recommended heap size check | refs
#33160
parent
9b003cd4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/scripts/test_wowza.py
+4
-16
4 additions, 16 deletions
tests/scripts/test_wowza.py
with
4 additions
and
16 deletions
tests/scripts/test_wowza.py
+
4
−
16
View file @
c0a40a77
...
...
@@ -9,7 +9,6 @@ from pathlib import Path
import
re
import
subprocess
# nosec: B404
import
sys
import
psutil
from
defusedxml.ElementTree
import
parse
from
psutil
import
net_connections
...
...
@@ -23,6 +22,7 @@ from utilities import logging as lg # noqa: E402
LATEST_VERSION
=
"
4.8.5
"
WOWZA_TUNE_FILE
=
"
/usr/local/WowzaStreamingEngine/conf/Tune.xml
"
WOWZA_RECOMMENDED_HEAP_SIZE
=
2000
def
main
():
...
...
@@ -141,28 +141,16 @@ def check_heap_size() -> tuple:
warnings
=
0
errors
=
0
# Current total RAM extraction (in MB)
svmem
=
psutil
.
virtual_memory
()
total_ram
=
round
(
svmem
.
total
/
1024
/
1024
)
# Configuration of the recommended wowza heap size regarding available RAM
if
total_ram
>=
15000
:
recommended_heap_size
=
8000
elif
total_ram
>=
7000
:
recommended_heap_size
=
4000
else
:
recommended_heap_size
=
2000
# Configured wowza heap size extraction
tune_xml
=
etree
.
parse
(
WOWZA_TUNE_FILE
)
heap_size
=
tune_xml
.
find
(
'
Tune/HeapSize
'
).
text
[
0
:
-
1
]
if
int
(
heap_size
)
<
recommended_heap_size
:
lg
.
warning
(
if
int
(
heap_size
)
<
WOWZA_RECOMMENDED_HEAP_SIZE
:
lg
.
error
(
"
not using recommended heap size: {0}M < {1}M (recommended)
"
.
format
(
int
(
heap_size
),
recommended_heap_size
)
)
warning
s
+=
1
error
s
+=
1
else
:
lg
.
success
(
"
using recommended heap size or above: {0}M
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment