From 0aa1200ee62d91783d157562e8a43f5bd3ba31da Mon Sep 17 00:00:00 2001 From: Anton Kirilov Date: Wed, 25 Nov 2015 12:46:18 +0000 Subject: Miscellaneous cleanup after recent compilation stats changes. Change-Id: If1cba56d7831d10032ea45efb88b85242be325e5 --- compare.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compare.py') diff --git a/compare.py b/compare.py index e52c540..6a622dd 100755 --- a/compare.py +++ b/compare.py @@ -62,7 +62,7 @@ def FilterSignificantChanges(in_1, in_2, diff_threshold, dev_threshold): for bench in benchmarks: m1, M1, ave1, d1, dp1 = utils_stats.ComputeStats(in_1[bench]) m2, M2, ave2, d2, dp2 = utils_stats.ComputeStats(in_2[bench]) - diff = (ave2 - ave1) / ave1 * 100 if ave1 != 0 else float("inf") + diff = utils_stats.GetRelativeDiff(ave1, ave2) if abs(diff) >= diff_threshold \ or dp1 >= dev_threshold \ or dp2 >= dev_threshold: @@ -82,7 +82,7 @@ def OrderResultsByDifference(in_1, in_2): for bench in benchmarks: m1, M1, ave1, d1, dp1 = utils_stats.ComputeStats(in_1[bench]) m2, M2, ave2, d2, dp2 = utils_stats.ComputeStats(in_2[bench]) - diff = (ave2 - ave1) / ave1 * 100 if ave1 != 0 else float("inf") + diff = utils_stats.GetRelativeDiff(ave1, ave2) if diff > 0: regressions[bench] = diff else: -- cgit v1.2.3