-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from mantidproject/memory_monitoring
Add memory monitoring to livereduce
- Loading branch information
Showing
6 changed files
with
74 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ dependencies: | |
- pyinotify | ||
- pre-commit | ||
- python-build | ||
- psutil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"instrument": "ISIS_Event", | ||
"script_dir": "test", | ||
"update_every": 3, | ||
"CONDA_ENV": "livereduce", | ||
"accum_method":"Add", | ||
"system_mem_limit_perc": 25, | ||
"mem_check_interval_sec": 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from threading import Thread | ||
|
||
from mantid import AlgorithmManager, ConfigService | ||
from mantid.simpleapi import FakeISISEventDAE | ||
|
||
facility = ConfigService.getFacility().name() | ||
ConfigService.setFacility("TEST_LIVE") | ||
|
||
|
||
def startServer(): | ||
FakeISISEventDAE(NEvents=1000000) | ||
|
||
|
||
try: | ||
thread = Thread(target=startServer) | ||
thread.start() | ||
thread.join() | ||
except Exception as e: # noqa: BLE001 | ||
print(e) | ||
alg = AlgorithmManager.newestInstanceOf("FakeISISEventDAE") | ||
if alg.isRunning(): | ||
alg.cancel() | ||
finally: | ||
ConfigService.setFacility(facility) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
print("Running proc script") |