Commit Graph

10 Commits

Author SHA1 Message Date
Christopher Haster 48c1a016a0 scripts: Fixed missing tuple unpack in glob-all CLI attrs
This was broken:

  $ ./scripts/plotmpl.py -L'*=bs=%(bs)s'

There may be a better way to organize this logic, but spamming if
statements works well enough.
2025-05-15 13:47:09 -05:00
Christopher Haster 2909da9c13 scripts: tracebd.py: Prioritize erases when rendering
I've made this mistake before!

One would think that it would be more interesting to show progs over
erases when they overlap, since progs always subset erases and show more
detail. However, erases occur much more rarely and are usually followed
by progs, so when rendering is low resolution (ascii) it's easy for
progs to completely cover up all erase operations.

Prioritizing erases prevents this.

At least this nuance is better documented this time around.
2025-04-23 23:18:49 -05:00
Christopher Haster 71930a5c01 scripts: Tweaked openio comment
Dang, this touched like every single script.
2025-04-16 15:23:06 -05:00
Christopher Haster 57c77b1b72 scripts: Fixed most flickering issues in RingIO
Two new tricks:

1. Hide the cursor while redrawing the ring buffer.

2. Build up the entire redraw in RAM first, and render everything in a
   single write call.

These _mostly_ get rid of the cursor flickering issues in rapidly
updating scripts.
2025-04-16 15:23:05 -05:00
Christopher Haster 0af90ea44b scripts: dbgtrace.py: Allow no-arg -w/--block-cycles to imply wear
This allows -w to provide a shortform flag for both --wear and
--block-cycles, depending on if you include a cycles argument:

- -w    => --wear
- -w100 => --block-cycles=100

I was originally hesitant to add this since it's inconsistent from
--read/--prog/--erase, which can't have shortforms due to flag
conflicts, but --wear is probably a special enough case.
2025-04-16 15:23:04 -05:00
Christopher Haster a5e59b2190 scripts: maps: Reverted all padding for status strings
After all, who doesn't love a good bit of flickering.

I think I was trying to be too clever, so reverting.

Printing these with no padding is the simplest solution, provides the
best information density, and worst case you can always add -s1 to limit
the update frequency if flickering is hurting readability.
2025-04-16 15:22:59 -05:00
Christopher Haster 27152ec597 scripts: maps: Adopted persistent padding for status strings
This automatically minimizes the status strings without flickering, all
it took was a bit of ~*global state*~.

---

If I'm remembering correctly, this was actually how tracebd.py used to
work before dbgbmap.py was added. The idea was dropped with dbgbmap.py
since dbgbmap.py relied on watch.py for real-time rendering and couldn't
persist state.

But now dbgbmap.py has its own -k/--keep-open flag, so that's not a
problem.
2025-04-16 15:22:58 -05:00
Christopher Haster 97c2287177 scripts: maps: Assume percentages never hit 100.0%
This isn't true, especially for dbgbmap.py, 100% is very possible in
filesystems with small files. But by limiting padding to 99.9%, we avoid
the annoying wasted space caused by the rare but occasional 100.0%.
2025-04-16 15:22:57 -05:00
Christopher Haster eb4c4c612e scripts: Dropped --padding from ascii art scripts
No one is realistically ever going to use this.

Ascii art is just too low resolution, trying to pad anything just wastes
terminal space. So we might as well not support --padding and save on
the additional corner cases.

Worst case, in the future we can always find this commit and revert
things.
2025-04-16 15:22:56 -05:00
Christopher Haster 9008e8c82c scripts: Renamed tracebd.py -> dbgtrace.py
This matches dbgbmap.py and fits in with the other dbg scripts.

The choice of tracebd.py for the name was arbitrary anyways, we just
needed something that wouldn't conflict with other scripts.
2025-04-16 15:22:55 -05:00