[PATCH] scripts: bloat-o-meter: enforce float for percentage
From: Wolfram Sang
Date: Sun Jul 17 2016 - 13:12:21 EST
From: Wolfram Sang <wsa-dev@xxxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxxxxxxx>
---
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