initial creation

This commit is contained in:
2025-05-20 11:57:43 -04:00
commit c98b612926
8447 changed files with 1862526 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env python
import os
import psutil
class MemoryChecker():
"""
Callable class to get current memory use of program.
Instances of this class may be called, at which time
they will return current memory use.
"""
def __init__(self):
self.process = psutil.Process(os.getpid()) # <1>
def __call__(self):
return self.process.memory_info().rss # <2>