Skip to content

Commit

Permalink
Handle zero mem available correctly in plot_metrics (#391)
Browse files Browse the repository at this point in the history
* Handle zero mem available correctly in plot_metrics

* Update cw_utils.py
  • Loading branch information
alexander-veit authored Sep 15, 2023
1 parent 1428d54 commit 583e416
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tibanna/cw_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 583e416

Please sign in to comment.