[LNT] r266636 - Add estimated regression age to the regression list

Chris Matthews via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 18 10:41:48 PDT 2016


Author: cmatthews
Date: Mon Apr 18 12:41:48 2016
New Revision: 266636

URL: http://llvm.org/viewvc/llvm-project?rev=266636&view=rev
Log:
Add estimated regression age to the regression list

Sometimes it is handy to see how old regressions are.  This adds an
estimate (since checking all the changes would require a lot of object
loads from the database) by just check the age of the first regression.

Modified:
    lnt/trunk/lnt/server/ui/regression_views.py
    lnt/trunk/lnt/server/ui/templates/v4_regression_list.html

Modified: lnt/trunk/lnt/server/ui/regression_views.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/regression_views.py?rev=266636&r1=266635&r2=266636&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/regression_views.py (original)
+++ lnt/trunk/lnt/server/ui/regression_views.py Mon Apr 18 12:41:48 2016
@@ -191,6 +191,7 @@ def v4_regression_list():
     form.regression_checkboxes.choices = list()
     regression_sizes = []
     impacts = []
+    ages = []
     for regression in regression_info:
         form.regression_checkboxes.choices.append((regression.id, 1,))
         reg_inds = ts.query(ts.RegressionIndicator) \
@@ -199,6 +200,9 @@ def v4_regression_list():
             .all()
         regression_sizes.append(len(reg_inds))
         impacts.append(calc_impact(ts, [x.field_change for x in reg_inds]))
+        # Now guess the regression age:
+        ages.append(reg_inds[0].field_change.run.end_time)
+        
     return render_template("v4_regression_list.html",
                            testsuite_name=g.testsuite_name,
                            regressions=regression_info,
@@ -208,6 +212,7 @@ def v4_regression_list():
                            form=form,
                            sizes=regression_sizes,
                            impacts=impacts,
+                           ages=ages,
                            analysis=lnt.server.reporting.analysis)
 
 

Modified: lnt/trunk/lnt/server/ui/templates/v4_regression_list.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/v4_regression_list.html?rev=266636&r1=266635&r2=266636&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_regression_list.html (original)
+++ lnt/trunk/lnt/server/ui/templates/v4_regression_list.html Mon Apr 18 12:41:48 2016
@@ -20,6 +20,7 @@
     <th>X</th>
     <th>Title</th>
     <th>State</th>
+    <th>Age</th>
     <th>Size</th>
     <th>Old</th>
     <th>New</th>
@@ -33,11 +34,13 @@
           {% set regress = regressions[loop.index -1] %}
           {% set size = sizes[loop.index -1] %}
           {% set impact = impacts[loop.index -1] %}
+          {% set age = ages[loop.index -1] %}
 
     <tr>
         <td>{{ form_regression }}</td>
         <td>{{utils.render_regression(regress)}} {% if regress.id|int == highlight|int %} <span class="label label-success">Updated</span> {% endif %} </td>
         <td>{{RegressionState.names.get(regress.state,"Missing")}}</td>
+        <td><span class="reltime" data-time="{{age.isoformat()}}" data-toggle="tooltip" title="{{age}}">{{ age.isoformat() }}</td>
         <th>{{ size }}</th>
         <td>{{ impact.previous }}</td><td>{{ impact.current }}</td>
         {{ utils.get_regression_cell_value(impact, analysis)}}




More information about the llvm-commits mailing list