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.
This commit is contained in:
Christopher Haster
2025-04-11 19:28:03 -05:00
parent 27152ec597
commit a5e59b2190
2 changed files with 11 additions and 46 deletions
+4 -18
View File
@@ -4588,26 +4588,12 @@ def main_(ring, disk, mroots=None, *,
lfs.cksum,
'' if lfs.ckgcksum() else '?'))
else:
# hack time~, to avoid flickering, keep track of worst padding
# globally
mdir_percent = '%.1f%%' % (100*mdir_count / max(len(bmap), 1))
btree_percent = '%.1f%%' % (100*btree_count / max(len(bmap), 1))
data_percent = '%.1f%%' % (100*data_count / max(len(bmap), 1))
main_.mdir_padding = max(
getattr(main_, 'mdir_padding', 0),
len(mdir_percent))
main_.btree_padding = max(
getattr(main_, 'btree_padding', 0),
len(btree_percent))
main_.data_padding = max(
getattr(main_, 'data_padding', 0),
len(data_percent))
title_ = ('bd %sx%s, %.*s mdir, %.*s btree, %.*s data' % (
title_ = ('bd %sx%s, %s mdir, %s btree, %s data' % (
lfs.block_size if lfs.block_size is not None else '?',
lfs.block_count if lfs.block_count is not None else '?',
main_.mdir_padding, mdir_percent,
main_.btree_padding, btree_percent,
main_.data_padding, data_percent))
'%.1f%%' % (100*mdir_count / max(len(bmap), 1)),
'%.1f%%' % (100*btree_count / max(len(bmap), 1)),
'%.1f%%' % (100*data_count / max(len(bmap), 1))))
# scale width/height if requested
if (to_scale is not None