From dc181bc9abf3a31985225316a9788bff3376222a Mon Sep 17 00:00:00 2001 From: Bo Peng Date: Tue, 9 Apr 2024 17:18:43 -0500 Subject: [PATCH] fix pylint --- src/sos/monitor.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/sos/monitor.py b/src/sos/monitor.py index e80899e3d..f42bcf321 100644 --- a/src/sos/monitor.py +++ b/src/sos/monitor.py @@ -310,12 +310,10 @@ def summarizeExecution(task_id, pulses, status="Unknown"): accu_cpu += float(c) + float(cc) accu_mem += float(m) + float(cm) count += 1 - if float(c) + float(cc) > peak_cpu: - peak_cpu = float(c) + float(cc) - if float(m) + float(cm) > peak_mem: - peak_mem = float(m) + float(cm) - if int(nch) > peak_nch: - peak_nch = int(nch) + + peak_cpu = max(peak_cpu, float(c) + float(cc)) + peak_mem = max(float(m) + float(cm), peak_mem) + peak_nch = max(int(nch), peak_nch) try: second_elapsed = end_time - start_time except Exception: