[llvm-commits] [zorg] r108400 - in /zorg/trunk/lnt/lnt: db/perfdbsummary.py util/NTEmailReport.py viewer/simple.ptl
Daniel Dunbar
daniel at zuster.org
Wed Jul 14 20:03:26 PDT 2010
Author: ddunbar
Date: Wed Jul 14 22:03:25 2010
New Revision: 108400
URL: http://llvm.org/viewvc/llvm-project?rev=108400&view=rev
Log:
LNT/simple: Only consider the tests present in the current (and previous) run when generating reports, instead of all tests submitted to the DB.
Modified:
zorg/trunk/lnt/lnt/db/perfdbsummary.py
zorg/trunk/lnt/lnt/util/NTEmailReport.py
zorg/trunk/lnt/lnt/viewer/simple.ptl
Modified: zorg/trunk/lnt/lnt/db/perfdbsummary.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/db/perfdbsummary.py?rev=108400&r1=108399&r2=108400&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/db/perfdbsummary.py (original)
+++ zorg/trunk/lnt/lnt/db/perfdbsummary.py Wed Jul 14 22:03:25 2010
@@ -2,7 +2,7 @@
Classes for caching metadata about a PerfDB instance.
"""
-from lnt.viewer.PerfDB import Run, RunInfo, Test
+from lnt.viewer.PerfDB import Run, RunInfo, Sample, Test
class SuiteSummary:
def __init__(self, name, path):
@@ -109,11 +109,27 @@
self.test_status_map = test_status_map
self.parameter_keys = parameter_keys
self.parameter_sets = parameter_sets
+ self.test_info_map = dict([(v,k) for k,v in test_id_map.items()])
def is_up_to_date(self, db):
return (not db.modified_test and
self.revision == db.get_revision_number("Test"))
+ def get_test_names_in_runs(self, db, runs):
+ # Load the distinct test ids for these runs.
+ test_ids = db.session.query(Sample.test_id)\
+ .filter(Sample.run_id.in_(runs)).distinct()
+
+ # Get the test names for the test ids.
+ test_names = [self.test_info_map[id][0]
+ for id, in test_ids]
+
+ # Limit to the tests we actually report.
+ test_names = list(set(test_names) & set(self.test_names))
+ test_names.sort()
+
+ return test_names
+
_cache = {}
def get_simple_suite_summary(db, tag):
key = (db.path, tag)
Modified: zorg/trunk/lnt/lnt/util/NTEmailReport.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/util/NTEmailReport.py?rev=108400&r1=108399&r2=108400&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/util/NTEmailReport.py (original)
+++ zorg/trunk/lnt/lnt/util/NTEmailReport.py Wed Jul 14 22:03:25 2010
@@ -114,6 +114,12 @@
# FIXME: Look for run across machine.
compare_to = None
+ # Get the list of tests we are interested in.
+ interesting_runs = [run.id]
+ if compare_to:
+ interesting_runs.append(compare_to.id)
+ test_names = ts_summary.get_test_names_in_runs(db, interesting_runs)
+
# Gather the changes to report, mapped by parameter set.
new_failures = Util.multidict()
new_passes = Util.multidict()
@@ -122,7 +128,7 @@
added_tests = Util.multidict()
removed_tests = Util.multidict()
existing_failures = Util.multidict()
- for name in ts_summary.test_names:
+ for name in test_names:
for pset in ts_summary.parameter_sets:
cr = sri.get_run_comparison_result(run, compare_to, name, pset,
comparison_window)
Modified: zorg/trunk/lnt/lnt/viewer/simple.ptl
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/viewer/simple.ptl?rev=108400&r1=108399&r2=108400&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/viewer/simple.ptl (original)
+++ zorg/trunk/lnt/lnt/viewer/simple.ptl Wed Jul 14 22:03:25 2010
@@ -484,6 +484,12 @@
htmltext(html_report)
self.renderPopupEnd()
+ # Get the list of tests we are interested in.
+ interesting_runs = [run.id]
+ if compare_to:
+ interesting_runs.append(compare_to.id)
+ test_names = ts_summary.get_test_names_in_runs(db, interesting_runs)
+
# Gather the runs to use for statistical data.
cur_id = run.id
comparison_window = []
@@ -599,7 +605,7 @@
"""
</tr>
</thead>"""
- for name in ts_summary.test_names:
+ for name in test_names:
"""
<tr>
<td><input type="checkbox" name="test.%s"></td>
More information about the llvm-commits
mailing list