searxng-beetroot/beetroot_template/stats.html
2023-04-04 21:23:00 +02:00

7.4 KiB

{% from 'beetroot/icons.html' import icon_big %} {% from 'beetroot/new_issue.html' import new_issue with context %} {% extends "beetroot/page_with_header.html" %} {%- macro th_sort(column_order, column_name) -%} {% if selected_engine_name %} {{ column_name }} {% elif column_order==sort_order %} {{ column_name }} {{ icon_big('arrow-dropdown') }} {% 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 %} {% for engine_stat in engine_stats.get('time', []) %} {% endfor %}
{{ th_sort('name', _("Engine name")) }} {{ th_sort('score', _('Scores')) }} {{ th_sort('result_count', _('Result count')) }} {{ th_sort('time', _('Response time')) }} {{ th_sort('reliability', _('Reliability')) }}
{{ engine_stat.name }} {% if engine_stat.score %} {{ engine_stat.score_per_result|round(1) }} {% endif %} {%- if engine_stat.result_count -%}
{{- engine_stat.result_count | int -}}
{{- "" -}} {%- endif -%}
{%- if engine_stat.total is not none -%}
{{- engine_stat.total | round(1) -}}
{{- "" -}}
{{- "" -}}
{{ _('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('reliablity') }}
{% 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 -%} {%- elif error.log_message -%} {%- endif -%} {% if error.log_parameters and error.log_parameters != (None, None, None) %}{{- '' -}} {% endif %}
{{ _('Exception') }}{{ error.exception_classname }}{{ _('Message') }}{{ error.log_message }}{{ _('Percentage') }}{{ error.percentage }}
{{ _('Parameter') }} {%- for param in error.log_parameters -%} {{ param }} {%- endfor -%}
{{ _('Filename') }}{{ error.filename }}:{{ error.line_no }}
{{ _('Function') }}{{ error.function }}
{{ _('Code') }}{{ error.code }}
{% endif %} {% endfor %} {% endfor %} {% if engine_reliabilities[selected_engine_name].checker %}

{{ _('Checker') }}

{% for test_name, results in engine_reliabilities[selected_engine_name].checker.items() %} {% endfor %}
{{ _('Failed test') }} {{ _('Comment(s)') }}
{{ test_name }} {% for r in results %}

{{ r }}

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