[LNT] r211584 - Don't report failure if sample is empty
Yi Kong
Yi.Kong at arm.com
Tue Jun 24 04:01:02 PDT 2014
Author: kongyi
Date: Tue Jun 24 06:01:02 2014
New Revision: 211584
URL: http://llvm.org/viewvc/llvm-project?rev=211584&view=rev
Log:
Don't report failure if sample is empty
It is not useful to report failure on empty sample or when not comparing to
other runs.
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=211584&r1=211583&r2=211584&view=diff
==============================================================================
--- lnt/trunk/lnt/server/reporting/analysis.py (original)
+++ lnt/trunk/lnt/server/reporting/analysis.py Tue Jun 24 06:01:02 2014
@@ -268,11 +268,13 @@ class RunInfo(object):
# but not ideal.
run_values = self._extract_values_from_samples(run.id, field.index)
+ run_geomean = self._calc_geomean(run_values)
- prev_values = self._extract_values_from_samples(compare_to.id, field.index)
-
+ if compare_to:
+ prev_values = self._extract_values_from_samples(compare_to.id, field.index)
+ else:
+ prev_values = []
prev_geomean = self._calc_geomean(prev_values)
- run_geomean = self._calc_geomean(run_values)
if run_geomean and prev_geomean:
delta = run_geomean - prev_geomean
@@ -285,8 +287,8 @@ class RunInfo(object):
return ComparisonResult(run_geomean, prev_geomean, delta,
pct_delta, stddev=None, MAD=None,
- cur_failed=not run_geomean,
- prev_failed=not prev_geomean,
+ cur_failed=run_values and not run_geomean,
+ prev_failed=prev_values and not prev_geomean,
samples=[run_geomean] if run_geomean else [],
prev_samples=[prev_geomean] if prev_geomean else [],
confidence_lv=0)
More information about the llvm-commits
mailing list