[LNT] r238962 - Add a filter to the Run pages so the user can filter by benchmark name
Chris Matthews
cmatthews5 at apple.com
Wed Jun 3 14:01:15 PDT 2015
Author: cmatthews
Date: Wed Jun 3 16:01:14 2015
New Revision: 238962
URL: http://llvm.org/viewvc/llvm-project?rev=238962&view=rev
Log:
Add a filter to the Run pages so the user can filter by benchmark name
Modified:
lnt/trunk/lnt/server/ui/templates/reporting/runs.html
lnt/trunk/lnt/server/ui/templates/v4_run.html
Modified: lnt/trunk/lnt/server/ui/templates/reporting/runs.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/reporting/runs.html?rev=238962&r1=238961&r2=238962&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/reporting/runs.html (original)
+++ lnt/trunk/lnt/server/ui/templates/reporting/runs.html Wed Jun 3 16:01:14 2015
@@ -13,13 +13,15 @@
{% if bucket and bucket_name != 'Unchanged Tests' %}
<p>
- <table style="{{ styles['table'] }}" class="sortable">
+ <table style="{{ styles['table'] }}">
<tr>
<th style="{{ styles['th'] }}" width="500">{{ bucket_name }} - {{ field_display_name }}</th>
{% if not show_perf %}
+ <tbody class="searchable">
{% for name in test_names %}
<tr><td style="{{ styles['td'] }}">{{ name }}</td></tr>
{% endfor %}
+ </tbody>
{% else %}
<th style="{{ styles['th'] }}">Δ {{ primary_field_suffix }}</th>
<th style="{{ styles['th'] }}">{{ primary_name }}</th>
@@ -30,7 +32,8 @@
<th style="{{ styles['th'] }}">σ {{ secondary_field_suffix }}</th>
{% endif %}
</tr>
-
+ <tbody class="searchable">
+
{% for name, cr, test_id in bucket %}
<tr>
<td style="{{ styles['td'] }}">
@@ -47,6 +50,7 @@
{% endif %}
</tr>
{% endfor %}
+ </tbody>
{% endif %}
</table>
{% endif %}
@@ -74,6 +78,7 @@
<th style="{{ styles['th'] }}">Duration</th>
</tr>
</thead>
+ <tbody>
{% for title, r in (('Current', run), ('Previous', compare_to), ('Baseline', baseline)) %}
{% if r %}
<tr>
@@ -86,6 +91,7 @@
<tr><td style="{{ styles['td'] }}" colspan=4>No {{ title }} Run</td></tr>
{% endif %}
{% endfor %}
+ </tbody>
</table>
{% if compare_to and run.machine != compare_to.machine %}
@@ -111,7 +117,7 @@
{% endif %}
</tr>
</thead>
-
+ <tbody class="searchable">
{% for i, name, num_items, num_items_vs_baseline in num_item_buckets %}
{% if num_items or num_items_vs_baseline %}
<tr>
@@ -123,7 +129,7 @@
</tr>
{% endif %}
{% endfor %}
-
+ </tbody>
<tfoot>
<tr>
<td style="{{ styles['td'] }}"><b>Total Tests</b></td>
Modified: lnt/trunk/lnt/server/ui/templates/v4_run.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/v4_run.html?rev=238962&r1=238961&r2=238962&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/v4_run.html (original)
+++ lnt/trunk/lnt/server/ui/templates/v4_run.html Wed Jun 3 16:01:14 2015
@@ -23,6 +23,30 @@
</script>
{% endblock %}
+{# Add JS to initialize the run page. #}
+{% block onload %}init(){% endblock %}
+
+{% block javascript %}
+
+function init() {
+ // Filter table by filter text box.
+ $(document).ready(function() {
+ (function ($) {
+ $('#filter').keyup(function () {
+
+ var filter_regex = new RegExp($(this).val(), 'i');
+ $('.searchable tr').hide();
+ $('.searchable tr').filter(function () {
+ return filter_regex.test($(this).text());
+ }).show();
+ })
+ }(jQuery));
+ });
+}
+
+{% endblock %}
+
+
{% block title %}Run Results{% endblock %}
{% macro get_cell_value(cr) %}
@@ -285,6 +309,11 @@
<section id="report" />
{{ utils.render_popup_begin('html_report', 'Report',
options.hide_report_by_default) }}
+
+ <div class="input-group"> <span class="input-group-addon">Benchmark Filter: </span>
+ <input id="filter" type="text" class="form-control" placeholder="Benchmark name regex...">
+ </div>
+
{{request_info.html_report|safe}}
{{ utils.render_popup_end() }}
@@ -310,7 +339,7 @@
{% if options.show_sample_counts %}<th>N</th>{% endif %}
</tr>
</thead>
- <tbody>
+ <tbody class="searchable">
{% set tests = [] %}
{% set (runs, compare_runs) = request_info.sri.get_sliding_runs(run, compare_to, request_info.num_comparison_runs) %}
{% for test_name,test_id in test_info %}
@@ -360,7 +389,7 @@
<th>%</th>
{% endfor %}
</thead>
- <tbody>
+ <tbody class="searchable">
{% for test_name,test_id in test_info %}
<tr>
<td>{{ test_name }}</td>
More information about the llvm-commits
mailing list