diff options
author | Craig Tiller <ctiller@google.com> | 2017-03-29 08:21:10 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-03-29 08:21:10 -0700 |
commit | 6a17fddc6996d555d508cbda50b990ca2bca3c82 (patch) | |
tree | 08a44e386f07bbc8a496aa1763be3642c2023f37 /tools/profiling/microbenchmarks | |
parent | ebb7e82c73884511188d3f43f5e9df1d6058aa66 (diff) |
Threshold % change also
Diffstat (limited to 'tools/profiling/microbenchmarks')
-rwxr-xr-x | tools/profiling/microbenchmarks/bm_diff.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/profiling/microbenchmarks/bm_diff.py b/tools/profiling/microbenchmarks/bm_diff.py index 43ba1b47e0..84217ec40b 100755 --- a/tools/profiling/microbenchmarks/bm_diff.py +++ b/tools/profiling/microbenchmarks/bm_diff.py @@ -161,8 +161,11 @@ class Benchmark: old = self.samples[False][f] if not new or not old: continue p = stats.ttest_ind(new, old)[1] - delta = avg(new) - avg(old) - if p < args.p_threshold and abs(delta) > 0.1: + new_avg = avg(new) + old_avg = avg(old) + delta = new_avg - old_avg + ratio = changed_ratio(new_avg, old_avg) + if p < args.p_threshold and abs(delta) > 0.1 and abs(ratio) > 0.05: self.final[f] = delta return self.final.keys() @@ -210,4 +213,3 @@ else: text = 'No significant performance differences' comment_on_pr.comment_on_pr(text) print text - |