[LNT] r238974 - Add back in missing deNoneification to Geomean calculation
Chris Matthews
cmatthews5 at apple.com
Wed Jun 3 14:01:48 PDT 2015
Author: cmatthews
Date: Wed Jun 3 16:01:47 2015
New Revision: 238974
URL: http://llvm.org/viewvc/llvm-project?rev=238974&view=rev
Log:
Add back in missing deNoneification to Geomean calculation
Modified:
lnt/trunk/lnt/server/reporting/analysis.py
Modified: lnt/trunk/lnt/server/reporting/analysis.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/reporting/analysis.py?rev=238974&r1=238973&r2=238974&view=diff
==============================================================================
--- lnt/trunk/lnt/server/reporting/analysis.py (original)
+++ lnt/trunk/lnt/server/reporting/analysis.py Wed Jun 3 16:01:47 2015
@@ -17,7 +17,7 @@ MIN_VALUE_PRECISION = 0.0001
def absmin_diff(current, prevs):
"""Min of differences between current sample and all previous samples.
- Given more than one min, use the last one detected which is probably a
+ Given more than one min, use the last one detected which is probably a
newer value. Returns (difference, prev used)
"""
diffs = [abs(current-prev) for prev in prevs]
@@ -36,7 +36,7 @@ def calc_geomean(run_values):
# Since we are only interested in the change of the central tendency,
# this workaround is good enough.
- values = [v + MIN_VALUE_PRECISION for v in run_values if v is not None]
+ values = [v + MIN_VALUE_PRECISION for v in run_values]
if not values:
return None
@@ -288,9 +288,12 @@ class RunInfo(object):
def get_geomean_comparison_result(self, run, compare_to, field, tests):
if tests:
prev_values,run_values = zip(*[(cr.previous,cr.current) for _,_,cr in tests])
+ prev_values = [x for x in prev_values if x is not None]
+ run_values = [x for x in run_values if x is not None]
else:
prev_values,run_values = [], []
+
return ComparisonResult(calc_geomean,
cur_failed=bool(run_values),
prev_failed=bool(prev_values),
More information about the llvm-commits
mailing list