aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/profiling
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-03-31 06:51:48 -0700
committerGravatar Craig Tiller <ctiller@google.com>2017-03-31 06:56:40 -0700
commit9298a92f78a8f4c024a3c3eddd287794521aaf85 (patch)
treec6de8ca56bf7ba2b47ff2af9c4b120c06587368c /tools/profiling
parentdc44c26856d7cc011cc28bad19327a7278e159b5 (diff)
Fixes
Diffstat (limited to 'tools/profiling')
-rwxr-xr-xtools/profiling/microbenchmarks/bm_diff.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/profiling/microbenchmarks/bm_diff.py b/tools/profiling/microbenchmarks/bm_diff.py
index 6f39738f59..4255e29ff2 100755
--- a/tools/profiling/microbenchmarks/bm_diff.py
+++ b/tools/profiling/microbenchmarks/bm_diff.py
@@ -176,7 +176,7 @@ class Benchmark:
self.samples[new][f].append(float(data[f]))
def process(self):
- for f in args.track:
+ for f in sorted(args.track):
new = self.samples[True][f]
old = self.samples[False][f]
if not new or not old: continue
@@ -185,10 +185,10 @@ class Benchmark:
old_mdn = median(old)
delta = new_mdn - old_mdn
ratio = changed_ratio(new_mdn, old_mdn)
- print 'new=%r old=%r new_mdn=%f old_mdn=%f delta=%f ratio=%f p=%f' % (
- new, old, new_mdn, old_mdn, delta, ratio, p
+ print '%s: new=%r old=%r new_mdn=%f old_mdn=%f delta=%f(%f:%f) ratio=%f(%f:%f) p=%f' % (
+ f, new, old, new_mdn, old_mdn, delta, abs(delta), _INTERESTING[f]['abs_diff'], ratio, abs(ratio), _INTERESTING[f]['pct_diff']/100.0, p
)
- if p < args.p_threshold and abs(delta) > _INTERESTING[f]['abs_diff'] and abs(ratio) > _INTERESTING[f]['pct_diff']:
+ if p < args.p_threshold and abs(delta) > _INTERESTING[f]['abs_diff'] and abs(ratio) > _INTERESTING[f]['pct_diff']/100.0:
self.final[f] = delta
return self.final.keys()