We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1729669 commit 1b230f8Copy full SHA for 1b230f8
bin/btrfs-blockgroup-report
@@ -129,13 +129,9 @@ def report_usage(args):
129
else:
130
grouped_stats[group] = 1
131
132
- min_count = min(count for _group, count in grouped_stats.items())
133
max_count = max(count for _group, count in grouped_stats.items())
134
for group, count in sorted(grouped_stats.items()):
135
- try:
136
- scaled_count = int(60 * (count - min_count) / (max_count - min_count))
137
- except ZeroDivisionError:
138
- scaled_count = 1
+ scaled_count = int(60 * count / max_count)
139
print(
140
'\t' * 2,
141
f' {str(group).rjust(3)}% packed',
0 commit comments