Skip to content

Commit

Permalink
does black like my formatting now?
Browse files Browse the repository at this point in the history
  • Loading branch information
bbean23 committed Mar 28, 2024
1 parent 473596c commit b15dce8
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions opencsp/common/lib/process/MemoryMonitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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")

Expand Down

0 comments on commit b15dce8

Please sign in to comment.