[llvm-commits] [zorg] r150114 - in /zorg/trunk/lnt/lnt/server/ui: templates/v4_run.html views.py
Daniel Dunbar
daniel at zuster.org
Wed Feb 8 15:33:43 PST 2012
Author: ddunbar
Date: Wed Feb 8 17:33:43 2012
New Revision: 150114
URL: http://llvm.org/viewvc/llvm-project?rev=150114&view=rev
Log:
[lnt/v0.4] lnt.server.ui: Add an option to filter out tests with a current value
below some minimum.
Modified:
zorg/trunk/lnt/lnt/server/ui/templates/v4_run.html
zorg/trunk/lnt/lnt/server/ui/views.py
Modified: zorg/trunk/lnt/lnt/server/ui/templates/v4_run.html
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/ui/templates/v4_run.html?rev=150114&r1=150113&r2=150114&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/ui/templates/v4_run.html (original)
+++ zorg/trunk/lnt/lnt/server/ui/templates/v4_run.html Wed Feb 8 17:33:43 2012
@@ -125,6 +125,10 @@
<input type="text" name="test_filter" value="{{
options.test_filter }}"><br>
+<b>Test Min. Value Filter:</b>
+<input type="text" name="test_min_value_filter" value="{{
+ options.test_min_value_filter }}"><br>
+
{% if compare_to %}
<input type="hidden" name="compare_to" value="{{compare_to.id}}">
{% endif %}
@@ -185,6 +189,7 @@
{% set cr = sri.get_run_comparison_result(
run, compare_to, test_id, field, comparison_window) %}
{% if cr.previous is not none or cr.current is not none %}
+{% if cr.current is none or cr.current >= test_min_value_filter %}
<tr>
<td><input type="checkbox" name="test.{{test_id}}"
value="{{field.index}}"></td>
@@ -192,6 +197,7 @@
test_name}}</a></td>
{{ get_cell_value(cr) }}
</tr>
+{% endif %}
{% endif %}
{% endfor %}
</table>
Modified: zorg/trunk/lnt/lnt/server/ui/views.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/ui/views.py?rev=150114&r1=150113&r2=150114&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/ui/views.py (original)
+++ zorg/trunk/lnt/lnt/server/ui/views.py Wed Feb 8 17:33:43 2012
@@ -838,6 +838,13 @@
else:
test_filter_re = None
+ options['test_min_value_filter'] = test_min_value_filter_str = \
+ request.args.get('test_min_value_filter', '')
+ if test_min_value_filter_str is not '':
+ test_min_value_filter = float(test_min_value_filter_str)
+ else:
+ test_min_value_filter = 0.0
+
# Generate the report for inclusion in the run page.
#
# FIXME: This is a crummy implementation of the concept that we want the
@@ -865,6 +872,12 @@
sri = lnt.server.reporting.analysis.RunInfo(ts)
+ # Filter the list of tests by name, if requested.
+ if test_filter_re:
+ test_names = [test
+ for test in test_names
+ if test_filter_re.search(test)]
+
return render_template(
"v4_run.html", ts=ts, run=run, compare_to=compare_to,
options=options, neighboring_runs=neighboring_runs,
@@ -872,7 +885,8 @@
text_report=text_report, html_report=html_report,
primary_fields=list(ts.Sample.get_primary_fields()),
comparison_window=comparison_window,
- sri=sri, test_info=test_info, runinfo=runinfo)
+ sri=sri, test_info=test_info, runinfo=runinfo,
+ test_min_value_filter=test_min_value_filter)
@v4_route("/order/<int:id>")
def v4_order(id):
More information about the llvm-commits
mailing list