diff options
Diffstat (limited to 'searx/webapp.py')
| -rwxr-xr-x | searx/webapp.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/searx/webapp.py b/searx/webapp.py index 4ecc9559e..dd79defcb 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -761,6 +761,11 @@ def search(): ) ) + # engine_timings: get engine response times sorted from slowest to fastest + engine_timings = sorted(result_container.get_timings(), reverse=True, key=lambda e: e.total) + max_response_time = engine_timings[0].total if engine_timings else None + engine_timings_pairs = [(timing.engine, timing.total) for timing in engine_timings] + # search_query.lang contains the user choice (all, auto, en, ...) # when the user choice is "auto", search.search_query.lang contains the detected language # otherwise it is equals to search_query.lang @@ -789,7 +794,9 @@ def search(): settings['search']['languages'], fallback=request.preferences.get_value("language") ), - timeout_limit = request.form.get('timeout_limit', None) + timeout_limit = request.form.get('timeout_limit', None), + timings = engine_timings_pairs, + max_response_time = max_response_time # fmt: on ) |