[LNT] r237654 - Use a property instead of a getter for test ids
Chris Matthews
cmatthews5 at apple.com
Mon May 18 18:59:08 PDT 2015
Author: cmatthews
Date: Mon May 18 20:59:08 2015
New Revision: 237654
URL: http://llvm.org/viewvc/llvm-project?rev=237654&view=rev
Log:
Use a property instead of a getter for test ids
Modified:
lnt/trunk/lnt/server/db/fieldchange.py
lnt/trunk/lnt/server/reporting/analysis.py
lnt/trunk/lnt/server/reporting/runs.py
lnt/trunk/lnt/server/ui/views.py
Modified: lnt/trunk/lnt/server/db/fieldchange.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/db/fieldchange.py?rev=237654&r1=237653&r2=237654&view=diff
==============================================================================
--- lnt/trunk/lnt/server/db/fieldchange.py (original)
+++ lnt/trunk/lnt/server/db/fieldchange.py Mon May 18 20:59:08 2015
@@ -39,7 +39,7 @@ def regenerate_fieldchanges_for_run(ts,
runinfo = lnt.server.reporting.analysis.RunInfo(ts, runs_to_load)
for field in list(ts.sample_fields):
- for test_id in runinfo.get_test_ids():
+ for test_id in runinfo.test_ids:
result = runinfo.get_comparison_result(runs, previous_runs,
test_id, field)
if result.is_result_interesting():
Modified: lnt/trunk/lnt/server/reporting/analysis.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/reporting/analysis.py?rev=237654&r1=237653&r2=237654&view=diff
==============================================================================
--- lnt/trunk/lnt/server/reporting/analysis.py (original)
+++ lnt/trunk/lnt/server/reporting/analysis.py Mon May 18 20:59:08 2015
@@ -153,7 +153,8 @@ class RunInfo(object):
self._load_samples_for_runs(runs_to_load)
- def get_test_ids(self):
+ @property
+ def test_ids(self):
return set(key[1] for key in self.sample_map.keys())
def get_sliding_runs(self, run, compare_run, num_comparison_runs=0):
Modified: lnt/trunk/lnt/server/reporting/runs.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/reporting/runs.py?rev=237654&r1=237653&r2=237654&view=diff
==============================================================================
--- lnt/trunk/lnt/server/reporting/runs.py (original)
+++ lnt/trunk/lnt/server/reporting/runs.py Mon May 18 20:59:08 2015
@@ -69,7 +69,7 @@ def generate_run_report(run, baseurl, on
# Get the test names, primary fields and total test counts.
test_names = ts.query(ts.Test.name, ts.Test.id).\
order_by(ts.Test.name).\
- filter(ts.Test.id.in_(sri.get_test_ids())).all()
+ filter(ts.Test.id.in_(sri.test_ids)).all()
primary_fields = list(ts.Sample.get_primary_fields())
num_total_tests = len(primary_fields) * len(test_names)
Modified: lnt/trunk/lnt/server/ui/views.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/views.py?rev=237654&r1=237653&r2=237654&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/views.py (original)
+++ lnt/trunk/lnt/server/ui/views.py Mon May 18 20:59:08 2015
@@ -371,7 +371,7 @@ def v4_run(id):
sri = lnt.server.reporting.analysis.RunInfo(ts, [id])
reported_tests = ts.query(ts.Test.name, ts.Test.id).\
filter(ts.Run.id == id).\
- filter(ts.Test.id.in_(sri.get_test_ids())).all()
+ filter(ts.Test.id.in_(sri.test_ids)).all()
json_obj['tests'] = {}
for test_name, test_id in reported_tests:
More information about the llvm-commits
mailing list