Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dfaast
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
Santhosh Kumar
dfaast
Commits
41a97782
Commit
41a97782
authored
May 04, 2024
by
Santhosh Kumar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup code
parent
6a3c55a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
src/example2/.function.py.swp
src/example2/.function.py.swp
+0
-0
src/example2/function.py
src/example2/function.py
+3
-3
No files found.
src/example2/.function.py.swp
0 → 100644
View file @
41a97782
File added
src/example2/function.py
View file @
41a97782
...
...
@@ -131,15 +131,15 @@ def manage_memory(memory_size):
except
ValueError
:
return
jsonify
({
'error'
:
'Invalid memory size'
}),
400
if
size
:
if
size
>
0
:
if
stress_process
:
# Kill existing stress-ng process
subprocess
.
run
([
'pkill'
,
'stress-ng'
])
stress_process
=
None
# Start stress-ng process with specified size
stress_process
=
subprocess
.
Popen
([
'stress-ng'
,
'--vm'
,
'1'
,
'--vm-bytes'
,
size
])
return
f
'Started new stress-ng process with {size} memory size.'
stress_process
=
subprocess
.
Popen
([
'stress-ng'
,
'--vm'
,
'1'
,
'--vm-bytes'
,
memory_
size
])
return
f
'Started new stress-ng process with {size}
MB
memory size.'
else
:
if
stress_process
:
# Kill existing stress-ng process
...
...
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