[llvm-commits] [zorg] r149620 - /zorg/trunk/lnt/lnt/server/ui/templates/v4_run.html
Daniel Dunbar
daniel at zuster.org
Thu Feb 2 11:07:40 PST 2012
Author: ddunbar
Date: Thu Feb 2 13:07:39 2012
New Revision: 149620
URL: http://llvm.org/viewvc/llvm-project?rev=149620&view=rev
Log:
[lnt/v0.4] Implement the full data table for v0.4 run display.
Modified:
zorg/trunk/lnt/lnt/server/ui/templates/v4_run.html
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=149620&r1=149619&r2=149620&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/ui/templates/v4_run.html (original)
+++ zorg/trunk/lnt/lnt/server/ui/templates/v4_run.html Thu Feb 2 13:07:39 2012
@@ -15,6 +15,63 @@
{% block body %}
+{% macro get_cell_value(cr) %}
+{% set test_status = cr.get_test_status() %}
+{% set value_status = cr.get_value_status() %}
+{% set run_cell_value = "-" if cr.current is none else "%.4f" % cr.current %}
+
+{% if options.show_previous %}
+{% set prev_cell_value = "-" if cr.previous is none else "%.4f" % cr.previous %}
+ <td>{{prev_cell_value}}</td>
+{% endif %}
+
+{% set cell_color = none %}
+{% if test_status == runinfo.REGRESSED %}
+ {% set cell_color = (233,128,128) %}
+{% elif test_status == runinfo.IMPROVED %}
+ {% set cell_color = (143,223,95) %}
+{% elif test_status == runinfo.UNCHANGED_FAIL %}
+ {% set cell_color = (255,195,67) %}
+{% endif %}
+
+{% if cell_color %}
+ <td bgcolor="{{ '#%02x%02x%02x' % cell_color }}">{{
+ run_cell_value}}</td>
+{% else %}
+ <td>{{run_cell_value}}</td>
+{% endif %}
+
+{% if (options.show_all or
+ value_status == runinfo.REGRESSED or
+ value_status == runinfo.IMPROVED) %}
+ {{ cr.pct_delta|aspctcell|safe }}
+{% else %}
+ <td>-</td>
+{% endif %}
+
+{% if options.show_delta %}
+ <td>{{ "-" if cr.delta is none else "%.4f" % cr.delta }}</td>
+{% endif %}
+{% if options.show_stddev %}
+ <td>{{ "-" if cr.stddev is none else "%.4f" % cr.stddev }}</td>
+{% endif %}
+{% if options.show_mad %}
+ <td>{{ "-" if cr.MAD is none else "%.4f" % cr.MAD }}</td>
+{% endif %}
+{% if options.show_all_samples %}
+ <td>[
+ {%- for v in cr.get_samples() -%}
+ {{ ", " if not loop.first }}
+ {{ "%.4f" % v }}
+ {%- endfor -%}]</td>
+{% endif %}
+
+{% if options.show_sample_counts %}
+ <td>{{cr.get_samples()|length}}</td>
+{% endif %}
+
+{% endmacro %}
+
{% call v4_utils.v4_run_page(ts, machine, run, compare_to, neighboring_runs) %}
{{ utils.render_popup_begin('view_options', 'View Options', true) }}
@@ -69,6 +126,7 @@
<input type="submit" name="submit" value="Update">
</form>
+
{{ utils.render_popup_end() }}
{{ utils.render_popup_begin('text_report', 'Report (Text)', true) }}
@@ -80,6 +138,85 @@
{{html_report|safe}}
{{ utils.render_popup_end() }}
+<h3>Tests</h3>
+
+<form method="GET" action="{{ v4_url_for('v4_graph', id=run.id) }}">
+
+{# Report one table for each primary field. #}
+{% for field in primary_fields %}
+<h4>{{field.name}}</h4>
+
+<table class="sortable" border=1>
+<thead>
+ <tr>
+ <th rowspan="1"></th>
+ <th rowspan="1">Name</th>
+ {% if options.show_previous %}
+ <th>Prev</th>
+ {% endif %}
+ <th>Current</th>
+ <th>%</th>
+ {% if options.show_delta %}
+ <th>Δ</th>
+ {% endif %}
+ {% if options.show_stddev %}
+ <th>σ</th>
+ {% endif %}
+ {% if options.show_mad %}
+ <th>MAD</th>
+ {% endif %}
+ {% if options.show_all_samples %}
+ <th>Samples</th>
+ {% endif %}
+ {% if options.show_sample_counts %}
+ <th>N</th>
+ {% endif %}
+ </tr>
+</thead>
+
+{% for test_name,test_id in test_info %}
+{% 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 %}
+ <tr>
+ <td><input type="checkbox" name="test.{{test_id}}"
+ value="{{field.index}}"></td>
+ <td>{{test_name}}</td>
+ {{ get_cell_value(cr) }}
+ </tr>
+{% endif %}
+{% endfor %}
+</table>
+
+{% endfor %}
+<p><input type="submit" value="Graph">
+</form>
+
+{% if options.show_data_table %}
+
+<h3>Test Data</h3>
+
+<pre>
+Name{% for field in primary_fields
+%} {{field.name}} {%
+ endfor %}
+-{% for field in primary_fields
+%} Prev Value %{% endfor %}
+{% for test_name,test_id in test_info
+%}{{
+test_name
+}}{%
+ for field in primary_fields
+%}{%
+ set cr = sri.get_run_comparison_result(
+ run, compare_to, test_id, field, comparison_window)
+%} {{cr.previous}} {{cr.current}} {{cr.pct_delta}}{%
+ endfor %}
+{%
+endfor %}
+</pre>
+{% endif %}
+
{% endcall %}
{% endblock %}
More information about the llvm-commits
mailing list