diff --git a/opencsp/common/lib/process/MemoryMonitor.py b/opencsp/common/lib/process/MemoryMonitor.py index 70e07d3b0..7a50e3b87 100644 --- a/opencsp/common/lib/process/MemoryMonitor.py +++ b/opencsp/common/lib/process/MemoryMonitor.py @@ -136,12 +136,7 @@ def _run(self): queue = multiprocessing.Queue() self._proc = multiprocessing.Process( - target=_monitor_sys_memory, - args=[ - self._max_lifetime_seconds, - self._stop_sig, - queue - ], + target=_monitor_sys_memory, args=[self._max_lifetime_seconds, self._stop_sig, queue] ) self._proc.start() @@ -181,11 +176,13 @@ def _run(self): # Print the returned value if do_print_min or do_print_threshold or self._always_print: self._log_func( - "MM: %s %s %s %s" % ( + "MM: %s %s %s %s" + % ( f"{int(elapsed):>3d}", f"{sys_tot:0.1f}".rjust(5), f"{sys_used:0.1f}".rjust(5), - f"{sys_free:0.1f}".rjust(5)) + f"{sys_free:0.1f}".rjust(5) + ) ) # Register the returned value @@ -234,11 +231,7 @@ def avg_free(self): return self._min_max_avg_free[2] -def _monitor_sys_memory( - max_lifetime_secs: int, - stop_sig: multiprocessing_event_type, - queue: multiprocessing.Queue, -): +def _monitor_sys_memory(max_lifetime_secs: int, stop_sig: multiprocessing_event_type, queue: multiprocessing.Queue): start = time.time() # print("monitor started")