[llvm-commits] [LNT] r165578 - in /lnt/trunk/lnt/server: reporting/dailyreport.py ui/templates/reporting/daily_report.html

Daniel Dunbar daniel at zuster.org
Tue Oct 9 17:44:34 PDT 2012


Author: ddunbar
Date: Tue Oct  9 19:44:34 2012
New Revision: 165578

URL: http://llvm.org/viewvc/llvm-project?rev=165578&view=rev
Log:
dailyreport: Add a first cut at ordering the results.
 - For now just use a simple ad hoc metric favoring tests with failures and large changes (positive or negative).

This can be improved in numerous ways:
 - We probably want some asymmetry for regressions.
 - We probably want to prioritize things which haven't flip-flopped vs the previous days result.

Modified:
    lnt/trunk/lnt/server/reporting/dailyreport.py
    lnt/trunk/lnt/server/ui/templates/reporting/daily_report.html

Modified: lnt/trunk/lnt/server/reporting/dailyreport.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/reporting/dailyreport.py?rev=165578&r1=165577&r2=165578&view=diff
==============================================================================
--- lnt/trunk/lnt/server/reporting/dailyreport.py (original)
+++ lnt/trunk/lnt/server/reporting/dailyreport.py Tue Oct  9 19:44:34 2012
@@ -128,6 +128,26 @@
                 machine_runs[(run.machine_id, day_index)] = run
 
         # Build the result table of tests with interesting results.
+        def compute_visible_results_priority(visible_results):
+            # We just use an ad hoc priority that favors showing tests with
+            # failures and large changes. We do this by computing the priority
+            # as tuple of whether or not there are any failures, and then sum of
+            # the mean percentage changes.
+            test, results = visible_results
+            had_failures = False
+            sum_abs_day0_deltas = 0.
+            for machine,day_results in results:
+                day0_cr = day_results[0]
+
+                test_status = day0_cr.get_test_status()
+
+                if (test_status==lnt.server.reporting.analysis.REGRESSED or
+                    test_status==lnt.server.reporting.analysis.UNCHANGED_FAIL):
+                    had_failures = True
+                elif day0_cr.pct_delta is not None:
+                    sum_abs_day0_deltas += abs(day0_cr.pct_delta)
+            return (-int(had_failures), -sum_abs_day0_deltas, test.name)
+
         self.result_table = []
         for field in self.fields:
             field_results = []
@@ -162,6 +182,10 @@
                 # view.
                 if visible_results:
                     field_results.append((test, visible_results))
+
+            # Order the field results by "priority".
+            field_results.sort(key=compute_visible_results_priority)
+
             self.result_table.append((field, field_results))
 
     def render(self, ts_url, only_html_body=True):

Modified: lnt/trunk/lnt/server/ui/templates/reporting/daily_report.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/reporting/daily_report.html?rev=165578&r1=165577&r2=165578&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/reporting/daily_report.html (original)
+++ lnt/trunk/lnt/server/ui/templates/reporting/daily_report.html Tue Oct  9 19:44:34 2012
@@ -41,7 +41,7 @@
 
 {% if (test_status == analysis.REGRESSED or
        test_status == analysis.UNCHANGED_FAIL) %}
-    <td style="{{ styles.td }}">FAIL</td>
+    <td style="{{ styles.td }}" bgcolor="#FF0000">FAIL</td>
 {% else %}
 
 {% if (value_status == analysis.REGRESSED or





More information about the llvm-commits mailing list