Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Unified Diff: bin/compare

Issue 756643004: Don't count a leading 1 as a signficant digit in the ratio. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/compare
diff --git a/bin/compare b/bin/compare
index fe489abadf660871a646f8f5029b21368cd6fb8a..e911f4a6c3db3021212b58a3a3ceb6c7d3558feb 100755
--- a/bin/compare
+++ b/bin/compare
@@ -36,4 +36,5 @@ maxlen = max(map(len, common))
bonferroni = SIGNIFICANCE_THRESHOLD / len(ps) # Adjust for the fact we've run multiple tests.
for ratio, p, key, am, bm in ps:
if p < bonferroni:
- print '%*s\t%6s -> %6s\t%.2gx' % (maxlen, key, humanize(am), humanize(bm), ratio)
+ str_ratio = ('%.2gx' if ratio < 1 else '%.3gx') % ratio
+ print '%*s\t%6s -> %6s\t%s' % (maxlen, key, humanize(am), humanize(bm), str_ratio)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698