Crawl stats: time format + sorting (#10)

* Nicer stats
* Fix right align
* No leading day zeros
* Fix right-align padding
This commit is contained in:
terorie
2018-12-14 15:30:06 +01:00
committed by Simon Fortier
parent e89eb6e3e0
commit 1ac3b97d7e
4 changed files with 34 additions and 13 deletions

View File

@@ -83,14 +83,15 @@
</tr>
</thead>
<tbody>
{% for server in crawl_server_stats %}
{% for entry in crawl_server_stats %}
{% set server, info = entry %}
<tr>
<td><b>{{ server }}</b></td>
<td>{{ crawl_server_stats[server].task_count }}</td>
<td>{{ crawl_server_stats[server].time|round(2) }}s</td>
<td>{{ crawl_server_stats[server].time_avg|round(2) }}s</td>
<td>{{ crawl_server_stats[server].file_count }}</td>
<td>{{ crawl_server_stats[server].file_count_avg | round(2) }}</td>
<td class="td-numeric">{{ info.task_count }}</td>
<td class="td-numeric">{{ info.time | duration_format() }}</td>
<td class="td-numeric">{{ info.time_avg | duration_format() }}</td>
<td class="td-numeric">{{ info.file_count }}</td>
<td class="td-numeric">{{ "%.2f" % info.file_count_avg }}</td>
</tr>
{% endfor %}
</tbody>