From 581927622d7364164c2979c0239c92e7e516be73 Mon Sep 17 00:00:00 2001 From: bbean Date: Wed, 27 Mar 2024 13:04:11 -0600 Subject: [PATCH] adding extra debugging print statements to test_MemoryMonitor --- opencsp/common/lib/process/test/test_MemoryMonitor.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/opencsp/common/lib/process/test/test_MemoryMonitor.py b/opencsp/common/lib/process/test/test_MemoryMonitor.py index fab7eba64..3a017630f 100644 --- a/opencsp/common/lib/process/test/test_MemoryMonitor.py +++ b/opencsp/common/lib/process/test/test_MemoryMonitor.py @@ -47,10 +47,16 @@ def test_stop(self): def test_large_memory_usage(self): monitor = mm.MemoryMonitor() monitor.start() + import opencsp.common.lib.tool.log_tools as lt + monitor2 = mm.MemoryMonitor(always_print=True, log_func=lt.error) + monitor2.start() time.sleep(1) a = [1] * 1_000_000_000 time.sleep(1.1) monitor.stop(wait=True) + monitor2.stop(wait=True) + lt.error(monitor.min_usage()) + lt.error(monitor.max_usage()) self.assertGreaterEqual(monitor.max_usage() - monitor.min_usage(), 0.5)