Coverage for templates/perf_test.html: 98%
47 statements
« prev ^ index » next coverage.py v7.16.2, created at 2026-10-20 05:10 +0000
« prev ^ index » next coverage.py v7.16.2, created at 2026-10-20 05:10 +0000
1{% extends "base.html" %}
2{% load i18n %}
4{% block title %}{% trans "Performance Test" %}{% endblock title %}
6{% block content %}
7<div class="container">
8 <h1>{% trans "Avatar Delivery Performance" %}</h1>
9 <p>{% trans "This page provides a comprehensive overview of how long each type of avatar takes to be generated and delivered." %}</p>
11 <table class="table table-striped table-hover mt-4">
12 <thead class="thead-dark">
13 <tr>
14 <th>Use Case</th>
15 <th>Hash Digest</th>
16 <th>Parameters</th>
17 <th>Status</th>
18 <th class="text-right text-monospace">Duration (ms)</th>
19 </tr>
20 </thead>
21 <tbody>
22 {% for res in perf_results %}
23 <tr>
24 <td>{{ res.name }}</td>
25 <td><small><code>{{ res.digest|truncatechars:15 }}</code></small></td>
26 <td>
27 {% for k, v in res.params.items %}
28 <span class="badge badge-info">{{ k }}={{ v }}</span>
29 {% endfor %}
30 </td>
31 <td>
32 {% if res.status == 200 %}
33 <span class="badge badge-success">OK</span>
34 {% elif res.status == 302 or res.status == 301 %}
35 <span class="badge badge-warning">Redirect ({{ res.status }})</span>
36 {% else %}
37 <span class="badge badge-danger">{{ res.status }}</span>
38 {% endif %}
39 </td>
40 <td class="text-right text-monospace">
41 <strong>{{ res.duration_str }} ms</strong>
42 </td>
43 </tr>
44 {% endfor %}
45 </tbody>
46 <tfoot>
47 <tr>
48 <td colspan="3" class="text-right"><strong>{% trans "Total" %}</strong></td>
49 <td class="text-right"><strong>{% trans "all scenarios" %}</strong></td>
50 <td class="text-right text-monospace">
51 <strong>{{ total_duration_str }} ms</strong>
52 </td>
53 </tr>
54 </tfoot>
55 </table>
56</div>
57{% endblock content %}