mirror of
https://github.com/littlefs-project/littlefs.git
synced 2025-12-07 08:02:46 +00:00
Tweaked scripts to render new entry ratios as +∞%
We already rely on this symbol in these scripts, so might use it to display the mathematically correct ratio for new entries. This has the added benefit of ordering new entries vs extremely big changes correctly: $ ./scripts/code.py -u test.after.csv -d test.before.csv function (1 added, 0 removed) osize nsize dsize test_a - 49 +49 (+∞%) test_b 19 719 +700 (+3684.2%) test_c 91 191 +100 (+109.9%) TOTAL 110 959 +849 (+771.8%)
This commit is contained in:
@@ -90,7 +90,7 @@ class RInt(co.namedtuple('RInt', 'x')):
|
||||
elif not old and not new:
|
||||
return 0.0
|
||||
elif not old:
|
||||
return 1.0
|
||||
return +m.inf
|
||||
else:
|
||||
return (new-old) / old
|
||||
|
||||
|
||||
Reference in New Issue
Block a user