From 583e4167c6acb883e301c16b8251c9fa1166c20e Mon Sep 17 00:00:00 2001 From: Alexander Veit <53857412+alexander-veit@users.noreply.github.com> Date: Fri, 15 Sep 2023 12:09:57 -0400 Subject: [PATCH] Handle zero mem available correctly in plot_metrics (#391) * Handle zero mem available correctly in plot_metrics * Update cw_utils.py --- tibanna/cw_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tibanna/cw_utils.py b/tibanna/cw_utils.py index 04cbe5d0..ddde8506 100755 --- a/tibanna/cw_utils.py +++ b/tibanna/cw_utils.py @@ -79,8 +79,8 @@ def get_metrics(self, nTimeChunks=1): max_disk_space_used_GB_chunks.append(self.max_disk_space_used()) max_ebs_read_chunks.append(self.max_ebs_read()) self.max_mem_used_MB = self.choose_max(max_mem_used_MB_chunks) - self.min_mem_available_MB = self.choose_min(min_mem_available_MB_chunks) - if self.max_mem_used_MB: + self.min_mem_available_MB = self.get_min(min_mem_available_MB_chunks) + if self.max_mem_used_MB and self.min_mem_available_MB!='': self.total_mem_MB = self.max_mem_used_MB + self.min_mem_available_MB self.max_mem_utilization_percent = self.max_mem_used_MB / self.total_mem_MB * 100 else: