[llvm-commits] [zorg] r106238 - in /zorg/trunk/lnt/lnt: db/perfdbsummary.py db/runinfo.py lnttool/__init__.py viewer/simple.ptl
Daniel Dunbar
daniel at zuster.org
Thu Jun 17 14:24:17 PDT 2010
Author: ddunbar
Date: Thu Jun 17 16:24:17 2010
New Revision: 106238
URL: http://llvm.org/viewvc/llvm-project?rev=106238&view=rev
Log:
LNT/simple: Switch SimpleSuiteSummary to only store test IDs, not test
instances, which may become invalid once the DB session has closed.
Modified:
zorg/trunk/lnt/lnt/db/perfdbsummary.py
zorg/trunk/lnt/lnt/db/runinfo.py
zorg/trunk/lnt/lnt/lnttool/__init__.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=106238&r1=106237&r2=106238&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/db/perfdbsummary.py (original)
+++ zorg/trunk/lnt/lnt/db/perfdbsummary.py Thu Jun 17 16:24:17 2010
@@ -48,7 +48,7 @@
# Collect all the test data.
test_names = set()
parameter_sets = set()
- test_map = {}
+ test_id_map = {}
has_status_markers = False
has_success_markers = False
for t in tests:
@@ -59,7 +59,7 @@
key = tuple(items)
parameter_sets.add(key)
- test_map[(name, key)] = t
+ test_id_map[(name, key)] = t.id
if name.endswith('.success'):
test_name = name.rsplit('.', 1)[0]
@@ -97,16 +97,16 @@
parameter_sets.sort()
return SimpleSuiteSummary(revision, tag, test_names,
- test_map, test_status_map,
+ test_id_map, test_status_map,
parameter_keys, parameter_sets)
def __init__(self, revision, tag, test_names,
- test_map, test_status_map,
+ test_id_map, test_status_map,
parameter_keys, parameter_sets):
self.revision = revision
self.tag = tag
self.test_names = test_names
- self.test_map = test_map
+ self.test_id_map = test_id_map
self.test_status_map = test_status_map
self.parameter_keys = parameter_keys
self.parameter_sets = parameter_sets
Modified: zorg/trunk/lnt/lnt/db/runinfo.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/db/runinfo.py?rev=106238&r1=106237&r2=106238&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/db/runinfo.py (original)
+++ zorg/trunk/lnt/lnt/db/runinfo.py Thu Jun 17 16:24:17 2010
@@ -94,8 +94,8 @@
def get_run_comparison_result(self, run, compare_to, test_name, pset,
comparison_window=[]):
# Get the test.
- test = self.test_suite_summary.test_map.get((test_name, pset))
- if test is None:
+ test_id = self.test_suite_summary.test_id_map.get((test_name, pset))
+ if test_id is None:
return ComparisonResult(run_value=None, prev_value=None, delta=None,
pct_delta=None, stddev=None, MAD=None,
cur_failed=None, prev_failed=None)
@@ -104,10 +104,10 @@
status_info = self.test_suite_summary.test_status_map.get(test_name)
if status_info is not None:
status_name,status_kind = status_info
- status_test = self.test_suite_summary.test_map.get(
+ status_test_id = self.test_suite_summary.test_id_map.get(
(status_name, pset))
else:
- status_test = status_kind = None
+ status_test_id = status_kind = None
# Load the sample data for the current and previous runs and the
# comparison window.
@@ -122,8 +122,8 @@
self._load_samples_for_runs(runs_to_load)
# Lookup the current and previous values.
- run_values = self.sample_map.get((run.id, test.id))
- prev_values = self.sample_map.get((compare_id, test.id))
+ run_values = self.sample_map.get((run.id, test_id))
+ prev_values = self.sample_map.get((compare_id, test_id))
# Determine whether this (test,pset) passed or failed in the current and
# previous runs.
@@ -132,8 +132,8 @@
run_failed = not run_values
prev_failed = not prev_values
else:
- run_status = self.sample_map.get((run.id,status_test.id))
- prev_status = self.sample_map.get((compare_id,status_test.id))
+ run_status = self.sample_map.get((run.id,status_test_id))
+ prev_status = self.sample_map.get((compare_id,status_test_id))
# FIXME: Support XFAILs.
#
Modified: zorg/trunk/lnt/lnt/lnttool/__init__.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/lnttool/__init__.py?rev=106238&r1=106237&r2=106238&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/lnttool/__init__.py (original)
+++ zorg/trunk/lnt/lnt/lnttool/__init__.py Thu Jun 17 16:24:17 2010
@@ -149,6 +149,8 @@
parser = OptionParser("%%prog %s [options] <url> <file>+" % name)
parser.add_option("", "--commit", dest="commit", type=int,
+ help=("whether the result should be committed "
+ "[%default]"),
default=False)
(opts, args) = parser.parse_args(args)
Modified: zorg/trunk/lnt/lnt/viewer/simple.ptl
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/viewer/simple.ptl?rev=106238&r1=106237&r2=106238&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/viewer/simple.ptl (original)
+++ zorg/trunk/lnt/lnt/viewer/simple.ptl Thu Jun 17 16:24:17 2010
@@ -229,7 +229,7 @@
graph_psets.append(ts_summary.parameter_sets[int(name[5:])])
# Get the test ids we want data for.
- test_ids = [ts_summary.test_map[(name,pset)].id
+ test_ids = [ts_summary.test_id_map[(name,pset)]
for name in graph_tests
for pset in graph_psets]
@@ -270,7 +270,7 @@
show_all_points = False
for name in graph_tests:
for pset in graph_psets:
- test_id = ts_summary.test_map[(name,pset)].id
+ test_id = ts_summary.test_id_map[(name,pset)]
# Get the plot for this test.
#
More information about the llvm-commits
mailing list