[llvm-commits] [zorg] r109778 - /zorg/trunk/lnt/lnt/db/perfdbsummary.py
Daniel Dunbar
daniel at zuster.org
Thu Jul 29 11:15:02 PDT 2010
Author: ddunbar
Date: Thu Jul 29 13:15:02 2010
New Revision: 109778
URL: http://llvm.org/viewvc/llvm-project?rev=109778&view=rev
Log:
LNT/perfdbsummary: Add a function for getting the status kind for a particular run.
Modified:
zorg/trunk/lnt/lnt/db/perfdbsummary.py
Modified: zorg/trunk/lnt/lnt/db/perfdbsummary.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/db/perfdbsummary.py?rev=109778&r1=109777&r2=109778&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/db/perfdbsummary.py (original)
+++ zorg/trunk/lnt/lnt/db/perfdbsummary.py Thu Jul 29 13:15:02 2010
@@ -200,6 +200,7 @@
self.runs_in_order = runs_in_order
self.order_by_run = order_by_run
self.machine_id_by_run = machine_id_by_run
+ self.run_status_kinds = {}
def is_up_to_date(self, db):
return (not db.modified_run and
@@ -231,3 +232,16 @@
id = self.runs_in_order[i]
if machine_id == self.machine_id_by_run[id]:
return id
+
+ def get_run_status_kind(self, db, run_id):
+ kind = self.run_status_kinds.get(run_id)
+ if kind is None:
+ # Compute the status kind by for .success tests in this run.
+ if db.session.query(Test.name).join(Sample)\
+ .filter(Sample.run_id == run_id)\
+ .filter(Test.name.endswith(".success")).first() is not None:
+ kind = False
+ else:
+ kind = True
+ self.run_status_kinds[run_id] = kind
+ return kind
More information about the llvm-commits
mailing list