linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scripts: bloat-o-meter: enforce float for percentage
@ 2016-07-17 17:11 Wolfram Sang
  0 siblings, 0 replies; only message in thread
From: Wolfram Sang @ 2016-07-17 17:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Michal Marek

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-07-17 17:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-17 17:11 [PATCH] scripts: bloat-o-meter: enforce float for percentage Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).