Skip to content

Commit 88e26bd

Browse files
committed
Updated potential memory leak detection
1 parent a919c26 commit 88e26bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/stability/stability_test_depthai.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def stability_test(fps):
8989
# Detect memory leaks
9090
processMemoryUsage = p.getDefaultDevice().getProcessMemoryUsage()
9191
if processMemoryUsage > MEMORY_LEAK_DETECTION_THRESHOLD * initialProcessMemoryUsage:
92-
sys.exit("Memory leak detected!")
92+
raise RuntimeError("Memory used by depthai-device process increased above the given threshold - potential memory leak detected")
9393
print(f"Memory used by depthai-device process: {processMemoryUsage} kB. Current time: {time.strftime('%Y-%m-%d %H:%M:%S', time.localtime())}")
9494
print(f"Running for {datetime.timedelta(seconds=time.time() - tStart)}", flush=True)
9595

0 commit comments

Comments
 (0)