mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
Stats: add request count
This commit is contained in:
parent
11c0651ef4
commit
037ab27381
4 changed files with 8 additions and 0 deletions
|
@ -206,6 +206,7 @@ def get_engines_stats(engine_name_list):
|
|||
'score': 0,
|
||||
'score_per_result': 0,
|
||||
'result_count': result_count,
|
||||
'request_count': sent_count,
|
||||
}
|
||||
|
||||
if successful_count and result_count_sum:
|
||||
|
|
|
@ -32,6 +32,10 @@
|
|||
.engine-reliability {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.engine-request-count {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
table.engine-error th.engine-error-type,
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
<th scope="col" class="result-count">{{ th_sort('result_count', _('Result count')) }}</th>
|
||||
<th scope="col" class="response-time">{{ th_sort('time', _('Response time')) }}</th>
|
||||
<th scope="col" class="engine-reliability">{{ th_sort('reliability', _('Reliability')) }}</th>
|
||||
<th scope="col" class="engine-request-count">{{ th_sort('request', _('Request count')) }}</th>
|
||||
</tr>
|
||||
{% for engine_stat in engine_stats.get('time', []) %}
|
||||
<tr>
|
||||
|
@ -83,6 +84,7 @@
|
|||
{%- endif -%}
|
||||
</td>
|
||||
<td class="engine-reliability"> {{ engine_reliabilities.get(engine_stat.name, {}).get('reliability') }}</td>
|
||||
<td class="engine-request-count"> {{ engine_stat.request_count }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
|
|
@ -155,6 +155,7 @@ STATS_SORT_PARAMETERS = {
|
|||
'result_count': (True, 'result_count', 0),
|
||||
'time': (False, 'total', 0),
|
||||
'reliability': (False, 'reliability', 100),
|
||||
'request': (True, 'request_count', 0),
|
||||
}
|
||||
|
||||
# Flask app
|
||||
|
|
Loading…
Add table
Reference in a new issue