Skip to content

Commit

Permalink
cubestat: fix snapshots_rendered check
Browse files Browse the repository at this point in the history
  • Loading branch information
okuvshynov committed Jun 14, 2024
1 parent 9a0ed07 commit 72039de
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cubestat/cubestat.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ def pre(self, group_name, title, is_multigpu):

def render(self):
with self.lock:
if self.snapshots_rendered > self.snapshots_observed:
logging.fatal('self.snapshots_rendered > self.snapshots_observed')
exit(0)
if self.snapshots_observed == self.snapshots_rendered and not self.settings_changed:
return
self.stdscr.erase()
Expand Down Expand Up @@ -303,7 +306,7 @@ def render(self):
self.write_char(i * 2 + 1, col, chr, curses.color_pair(color_pair))

i += 1
self.snapshots_rendered += 1
self.snapshots_rendered += 1
if self.modes['time'] != TimelineMode.none:
tl = plot_timeline(self.cols - 2, args.refresh_ms, self.filling, self.timeline_interval, self.horizontal_shift)
self.write_string(i * 2, 0, "╚" + tl + "╝")
Expand Down

0 comments on commit 72039de

Please sign in to comment.