Skip to content

Commit

Permalink
adding extra debugging print statements to test_MemoryMonitor
Browse files Browse the repository at this point in the history
  • Loading branch information
bbean23 committed Mar 27, 2024
1 parent 5d175c5 commit 5819276
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions opencsp/common/lib/process/test/test_MemoryMonitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down

0 comments on commit 5819276

Please sign in to comment.