<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
    <head>
        <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
        <title>Report</title>
        <link href="./lib/css/zp-compressed.css" type="text/css" media="screen, print" rel="stylesheet" />
        <link href="./lib/css/zp-print.css" type="text/css" media="print" rel="stylesheet" />
        <!--[if IE]>
        <link href="./lib/css/zp-ie.css" type="text/css" media="screen" rel="stylesheet" />
        <![endif]-->
        <link href="./lib/pastie.css" type="text/css" media="all" rel="stylesheet" />
        <style type="text/css">
            .sidebar {
                font-size: 11px;
            }

            p.intro {
                font-style: bold;
            }

            .content .padding {
                padding: 0 36px 0 0;
            }

            .item .padding {
                padding: 0 12px 0 0;
            }

            .list-item h2 {
                margin: 0;
                line-height: 27px;
            }

        </style>
    </head>
    <body>

        <div class="skip">
            <a href="#content" title="Go directly to page content">Go to page content</a>
        </div>

        <div class="zp-wrapper">
            <div class="zp-70 content">
                <div class="padding">
                    <h1>Dexy Run Report</h1>
                    <h2>Results of your Run</h2>
                    <br />
                    <p>This is a logfile to help you understand how dexy has processed your files and to assist with troubleshooting.</p>
                    <br />
                    <br />
                    <h3>Timing</h3>
                    <p>The total elapsed time for batch {{ batch_id }} was {{ "%0.2f" % batch_info.elapsed }} ({{ "%0.2f" % (float(batch_info.elapsed)/60)}} minutes).</p>
                    <p>A total of {{ total_artifacts }} artifacts were created, of which {{ base_artifacts }} were base artifacts (the initial stage of processing), {{ cached_artifacts }} were cached from previous runs, and {{ run_artifacts }} were run. The total time spent running artifacts was {{ total_run_elapsed }}, or {{ "%0.2f%%" % (float(total_run_elapsed) / float(batch_info.elapsed) * 100) }} of the total batch time.</p>

<pre>
Controller Times:
{% for name, elapsed in batch_info['timing'] -%}
&nbsp;&nbsp;{{ "%0.3f" % elapsed }} {{ name }}
{% endfor -%}
&nbsp;
&nbsp;

Filter Run Times:
{% for filter_class in sorted(run_time_by_key) -%}
{% set times = run_time_by_key[filter_class] -%}
{{ filter_class }}
n {{ len(times) }}
min: {{ min(times) }}
max: {{ max(times) }}
avg: {{ float(sum(times))/len(times) }}

{% endfor -%}
</pre>
                    <h3>Config</h3>
                    <p>This is the configuration which was used for this run:</p>
                    {{ dexy_config }}

                    <h1>Documents</h1>

                    {% for key, doc in docs.iteritems() -%}
                    <hr />
                    <h2 id="{{ key }}">{{ key }}</h2>
<pre>
Total elapsed time: {{ "%0.3f" % doc.elapsed }}
{% for name, elapsed in doc['timing'] -%}
&nbsp;&nbsp;{{ "%0.3f" % elapsed }} {{ name }}
{% endfor -%}
</pre>
                    {% if doc.args.__len__() > 0 %}
                    <br />
                    <h4>Arguments</h4>
                    <pre><code>
                    {{ highlight_json(doc.args) }}
                    </code></pre>
                    {% endif %}

                    {% if doc.inputs.__len__() > 0 %}
                    <br />
                    <h4>Inputs</h4>
                    <ul>
                        {% for key in doc.inputs %}
                        <li><a href="#{{ key }}">{{ key }}</a></li>
                        {% endfor %}
                    </ul>
                    {% endif %}

                    <br />
                    <h4>Artifacts</h4>
                    <table style="width: 800px; border: thin solid black; border-collapse: collapse;">
                        <tr><th>Key</th><th>Link</th><th>Final</th><th>Elapsed</th><th>Run Type</th><th>Sections</th></tr>
                        {% for h, source, elapsed in doc.artifacts -%}
                        {% set a = artifacts[h] -%}
                        <tr>
                            <td style="padding-left: 10px; padding-right: 10px; border:thin solid black;">{{ a.key }}</td>
                            <td style="padding-left: 10px; padding-right: 10px; border:thin solid black;"><a href="../../{{ a.filepath() }}">{{ a.filepath() }}</a></td>
                            <td style="padding-left: 10px; padding-right: 10px; border:thin solid black;">{{ a.final }}</td>
                            <td style="padding-left: 10px; padding-right: 10px; border:thin solid black; text-align:center;">{{ "%0.4f" % elapsed }}</td>
                            <td style="padding-left: 10px; padding-right: 10px; border:thin solid black;">{{ source }}</td>
                            <td style="padding-left: 10px; padding-right: 10px; border:thin solid black;">
                                {% if a.data_dict -%}
                                {% for k in a.data_dict.keys() -%}
                                {{ k }}<br />
                                {% endfor -%}
                                {% endif -%}
                            </td>
                        </tr>
                        {% endfor -%}
                    </table>
                    <br />
                    {% for h, source, elapsed in doc.artifacts -%}
                    {% set a = artifacts[h] -%}
                    {% if a.stdout -%}
                    <p><b>{{ a.key }} stdout</b></p>
                    {{ a.stdout_html }}
                    {% endif -%}
                    {% endfor -%}
                    <br />
                    <h4>Document Log</h4>
<pre>
{{ doc.log }}
</pre>
                    <br />
                    {% endfor %}
                </div>
            </div>

            <div class="zp-30 sidebar">
                <h2>List of Documents</h2>
                <ul>
                    {% for doc in sorted(docs) %}
                    <li><a href="#{{ doc }}">{{ doc }}</a></li>
                    {% endfor %}
                </ul>
            </div>
        </div>
    </body>
</html>
