Back to Searxng

{% if selected_engine_name %}{% endif %}{{ _('Engine stats') }}{% if selected_engine_name %} - {{ selected_engine_name }}{% endif %}

searx/templates/simple/stats.html

latest3.3 KB
Original Source

{% from 'simple/icons.html' import icon_big %} {% from 'simple/new_issue.html' import new_issue with context %} {% extends "simple/page_with_header.html" %} {%- macro th_sort(column_order, column_name) -%} {% if selected_engine_name %} {{ column_name }} {% elif column_order==sort_order %} {{ icon_big('navigate-down') }} {{ column_name }} {% else %} {{ column_name }} {% endif %} {%- endmacro -%} {% block head %} {% endblock %} {% block content %}

{% if selected_engine_name %}{% endif %}{{ _('Engine stats') }}{% if selected_engine_name %} - {{ selected_engine_name }}{% endif %}

{% if not engine_stats.get('time') %} {{ _('There is currently no data available. ') }} {% else %}

{{ th_sort('name', _("Engine name")) }}{{ th_sort('score', _('Scores')) }}{{ th_sort('result_count', _('Result count')) }}{{ th_sort('time', _('Response time')) }}{{ th_sort('reliability', _('Reliability')) }}
{% for engine_stat in engine_stats.get('time', []) %}[{{ engine_stat.name }}]({{%20url_for('stats',%20engine=engine_stat.namee)%20}}){% if engine_stat.score %} {{ engine_stat.score_per_resultround(1) }} {% endif %}
{{- engine_stat.result_countint -}}
{{- "" -}}

{{- "" -}} {%- endif -%} | {%- if engine_stat.total is not none -%} {{- engine_stat.total | round(1) -}} {{- "" -}} {% if engine_stat.http is not none and engine_stats.max_time %}

{%- endif -%} {% if engine_stat.processing is not none and engine_stats.max_time %}

{%- endif -%}

{{- "" -}}

{{ _('Total') }}{{ _('HTTP') }}{{ _('Processing') }}
{{ _('Median') }}{{ engine_stat.total }}{{ engine_stat.http or ''}}{{ engine_stat.processing }}
{{ _('P80') }}{{ engine_stat.total_p80 }}{{ engine_stat.http_p80 or '' }}{{ engine_stat.processing_p80 }}
{{ _('P95') }}{{ engine_stat.total_p95 }}{{ engine_stat.http_p95 or '' }}{{ engine_stat.processing_p95 }}

{%- endif -%} | {{ engine_reliabilities.get(engine_stat.name, {}).get('reliability') }} | {% endfor %} {% endif %} {% if selected_engine_name %} {% for secondary in [False, True] %} {% set ns = namespace(first=true) %} {% for error in engine_reliabilities[selected_engine_name].errors %} {% if secondary == error.secondary %} {% if ns.first %} {% set ns.first = false %}

{% if secondary %}{{ _('Warnings') }}{% else %}{{ _('Errors and exceptions') }}{% endif %}

{% endif %}

| {%- if error.exception_classname -%} {{ _('Exception') }} | {{ error.exception_classname }} | {%- elif error.log_message -%} {{ _('Message') }} | {{ error.log_message }} | {%- endif -%} {{ _('Percentage') }} | {{ error.percentage }} | {% if error.log_parameters and error.log_parameters != (None, None, None) %}| {{ _('Parameter') }} |{{- '' -}} {%- for param in error.log_parameters -%} {{ param }} {%- endfor -%} | {% endif %} | {{ _('Filename') }} | {{ error.filename }}:{{ error.line_no }} | | {{ _('Function') }} | {{ error.function }} | | {{ _('Code') }} | {{ error.code }} |

{% endif %} {% endfor %} {% endfor %} {{ new_issue(selected_engine_name, engine_reliabilities[selected_engine_name]) }} {% endif %} {% endblock %}