Messages in this thread Patch in this message | | | From | Wolfram Sang <> | Subject | [PATCH] scripts: bloat-o-meter: enforce float for percentage | Date | Sun, 17 Jul 2016 19:11:54 +0200 |
| |
From: Wolfram Sang <wsa-dev@sang-engineering.com>
The printout for the percentage of changes was expected to be a float, but the calculation was kept as integer. Enforce float to get more precise numbers. Add spaces around operators while here.
Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com> --- scripts/bloat-o-meter | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/bloat-o-meter b/scripts/bloat-o-meter index 0254f3ba0dbab0..a73751db91774e 100755 --- a/scripts/bloat-o-meter +++ b/scripts/bloat-o-meter @@ -68,4 +68,4 @@ for d, n in delta: if d: print("%-40s %7s %7s %+7d" % (n, old.get(n,"-"), new.get(n,"-"), d)) print("Total: Before=%d, After=%d, chg %f%%" % \ - (otot, ntot, (ntot - otot)*100/otot)) + (otot, ntot, (ntot - otot) * 100.0 / otot)) -- 2.8.1
| |