Added dynamic adding and loading of results on the test page

This commit is contained in:
2025-06-25 17:14:19 -04:00
parent fad6899683
commit 1b4fd8dec9
6 changed files with 112 additions and 20 deletions

View File

@ -51,7 +51,7 @@
<div class="twelve columns">
<h3>Benchmark results:</h3>
<table class="u-full-width">
<table id="results-table" class="u-full-width" data-test-id="{{ test.id }}">
<thead>
<tr>
<th>Benchmark</th>
@ -63,18 +63,13 @@
</tr>
</thead>
<tbody>
{% for r in test.benchmarkResults() %}
<tr>
<td>{{ r.name }}</td>
<td>{{ r.scoring | capitalize }}</td>
<td>{{ r.count }}</td>
<td>{{ r.average }}</td>
<td>{{ r.minimum ? r.minimum : 'N/a' }}</td>
<td>{{ r.maximum ? r.maximum : 'N/a' }}</td>
</tr>
{% for b in test.benchmarks %}
<tr data-benchmark-id="{{ b.id }}"></tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<script src="/js/test.js"></script>
{% endblock %}