2014-09-22 20:42:29 +00:00
|
|
|
{% extends "oscar/base.html" %}
|
2021-04-14 16:11:35 +00:00
|
|
|
|
2014-09-26 16:26:46 +00:00
|
|
|
{% block title %}{{ _('stats') }} - {% endblock %}
|
2021-04-22 15:47:53 +00:00
|
|
|
|
|
|
|
{%- macro th_sort(column_order, column_name) -%}
|
|
|
|
{% if column_order==sort_order %}
|
|
|
|
{{ column_name }} {{ icon('chevron-down') }}
|
|
|
|
{% else %}
|
|
|
|
<a href="{{ url_for('stats', sort=column_order) }}">{{ column_name }}
|
|
|
|
{% endif %}
|
|
|
|
{%- endmacro -%}
|
|
|
|
|
2014-09-22 20:42:29 +00:00
|
|
|
{% block content %}
|
|
|
|
<div class="container-fluid">
|
|
|
|
<h1>{{ _('Engine stats') }}</h1>
|
|
|
|
<div class="row">
|
2021-04-22 10:14:11 +00:00
|
|
|
<div class="col-xs-12 col-sm-12 col-md-12">
|
|
|
|
<div class="table-responsive">
|
|
|
|
{% if not engine_stats.get('time') %}
|
|
|
|
<div class="col-sm-12 col-md-12">
|
|
|
|
{% include 'oscar/messages/no_data_available.html' %}
|
2014-09-22 20:42:29 +00:00
|
|
|
</div>
|
2021-04-22 10:14:11 +00:00
|
|
|
{% else %}
|
|
|
|
<table class="table table-hover table-condensed table-striped">
|
|
|
|
<tr>
|
2021-04-22 15:47:53 +00:00
|
|
|
<th scope="col" style="width:20rem;">{{ th_sort('name', _("Engine name")) }}</th>
|
|
|
|
<th scope="col" style="width:7rem; text-align: right;">{{ th_sort('score', _('Scores')) }}</th>
|
|
|
|
<th scope="col">{{ th_sort('result_count', _('Result count')) }}</th>
|
|
|
|
<th scope="col">{{ th_sort('time', _('Response time')) }}</th>
|
|
|
|
<th scope="col" style="text-align: right;">{{ th_sort('reliability', _('Reliability')) }}</th>
|
2021-04-22 10:14:11 +00:00
|
|
|
</tr>
|
|
|
|
{% for engine_stat in engine_stats.get('time', []) %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ engine_stat.name }}</td>
|
|
|
|
<td style="text-align: right;">
|
2021-04-22 15:47:53 +00:00
|
|
|
{% if engine_stat.score %}
|
2021-04-22 10:14:11 +00:00
|
|
|
<span aria-labelledby="{{engine_stat.name}}_score" >{{ engine_stat.score|round(1) }}</span>
|
2021-04-23 09:01:54 +00:00
|
|
|
<div class="engine-tooltip text-left" role="tooltip" id="{{engine_stat.name}}_score">{{- "" -}}
|
2021-04-22 10:14:11 +00:00
|
|
|
<p>{{ _('Scores per result') }}: {{ engine_stat.score_per_result | round(3) }}</p>
|
|
|
|
</div>
|
2021-04-22 15:47:53 +00:00
|
|
|
{% endif %}
|
2021-04-22 10:14:11 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
2021-04-22 15:47:53 +00:00
|
|
|
{%- if engine_stat.result_count -%}
|
2021-04-22 10:14:11 +00:00
|
|
|
<span class="stacked-bar-chart-value">{{- engine_stat.result_count | int -}}</span>{{- "" -}}
|
2021-04-23 09:01:54 +00:00
|
|
|
<span class="stacked-bar-chart" aria-hidden="true">{{- "" -}}
|
2021-04-22 10:14:11 +00:00
|
|
|
<span style="width: calc(max(2px, 100%*{{ (engine_stat.result_count / engine_stats.max_result_count )|round(3) }}))" class="stacked-bar-chart-serie1"></span>{{- "" -}}
|
2021-04-22 15:47:53 +00:00
|
|
|
</span>
|
|
|
|
{%- endif -%}
|
2021-04-22 10:14:11 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
2021-04-22 15:47:53 +00:00
|
|
|
{%- if engine_stat.total -%}
|
2021-04-22 10:14:11 +00:00
|
|
|
<span class="stacked-bar-chart-value">{{- engine_stat.total | round(1) -}}</span>{{- "" -}}
|
2021-04-23 09:01:54 +00:00
|
|
|
<span class="stacked-bar-chart" aria-labelledby="{{engine_stat.name}}_time" aria-hidden="true">{{- "" -}}
|
2021-04-22 10:14:11 +00:00
|
|
|
<span style="width: calc(max(2px, 100%*{{ (engine_stat.http / engine_stats.max_time )|round(3) }}))" class="stacked-bar-chart-serie1"></span>{{- "" -}}
|
|
|
|
<span style="width: calc(100%*{{ engine_stat.processing / engine_stats.max_time |round(3) }})" class="stacked-bar-chart-serie2"></span>{{- "" -}}
|
|
|
|
</span>{{- "" -}}
|
2021-04-23 09:01:54 +00:00
|
|
|
<div class="engine-tooltip text-left" role="tooltip" id="{{engine_stat.name}}_time">{{- "" -}}
|
2021-04-22 10:14:11 +00:00
|
|
|
<table class="table table-striped">
|
|
|
|
<tr>
|
|
|
|
<th scope="col"></th>
|
|
|
|
<th scope="col">{{ _('Total') }}</th>
|
|
|
|
<th scope="col">{{ _('HTTP') }}</th>
|
|
|
|
<th scope="col">{{ _('Processing') }}</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="col">{{ _('Median') }}</th>
|
|
|
|
<td>{{ engine_stat.total }}</td>
|
|
|
|
<td>{{ engine_stat.http }}</td>
|
|
|
|
<td>{{ engine_stat.processing }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="col">{{ _('P80') }}</th>
|
|
|
|
<td>{{ engine_stat.total_p80 }}</td>
|
|
|
|
<td>{{ engine_stat.http_p80 }}</td>
|
|
|
|
<td>{{ engine_stat.processing_p80 }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="col">{{ _('P95') }}</th>
|
|
|
|
<td>{{ engine_stat.total_p95 }}</td>
|
|
|
|
<td>{{ engine_stat.http_p95 }}</td>
|
|
|
|
<td>{{ engine_stat.processing_p95 }}</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
2021-04-22 15:47:53 +00:00
|
|
|
{%- endif -%}
|
2021-04-22 10:14:11 +00:00
|
|
|
</td>
|
2021-04-22 15:47:53 +00:00
|
|
|
<td style="text-align: right;"> {{ engine_reliabilities.get(engine_stat.name, {}).get('reliablity') }}</td>
|
2021-04-22 10:14:11 +00:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
2014-09-26 16:26:46 +00:00
|
|
|
{% endif %}
|
2014-09-22 20:42:29 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|