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%.
This commit is contained in:
Christopher Haster
2025-04-11 19:02:18 -05:00
parent eb4c4c612e
commit 97c2287177
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -1246,16 +1246,16 @@ def main(path='-', *,
else:
title_ = ('bd %dx%d%s%s%s%s' % (
block_size_, block_count_,
', %6s read' % (
', %5s read' % (
'%.1f%%' % (100*readed / max(total, 1)))
if reads else '',
', %6s prog' % (
', %5s prog' % (
'%.1f%%' % (100*proged / max(total, 1)))
if progs else '',
', %6s erase' % (
', %5s erase' % (
'%.1f%%' % (100*erased / max(total, 1)))
if erases else '',
', %15s wear' % (
', %13s wear' % (
'%.1f%% +-%.1fσ' % (
100*wear_avg / max(block_cycles_, 1),
100*wear_stddev / max(block_cycles_, 1)))