Tweaked tracebd.py to prioritize progs over erases

Yes, erases are the more costly operation that we should highlight. But,
aside from broken code, you can never prog more than you erase.

This makes it more useful to priortize progs over erases, so erases
without an overlaying prog show up as a relatively unique blue,
indicating regions of memory that have been erased but not progged.

Too many erased-but-not-progged regions indicate a potentially wastefull
algorithm.
This commit is contained in:
Christopher Haster
2023-10-24 02:18:40 -05:00
parent d1e79bffc7
commit 6d8eb948d1

View File

@@ -315,12 +315,12 @@ class Block(int):
c = wear_chars[int(w * (len(wear_chars)-1))]
f.append(wear_colors[int(w * (len(wear_colors)-1))])
if erase and self.erased:
c = chars[2]
f.append(colors[2])
elif prog and self.proged:
if prog and self.proged:
c = chars[1]
f.append(colors[1])
elif erase and self.erased:
c = chars[2]
f.append(colors[2])
elif read and self.readed:
c = chars[0]
f.append(colors[0])