summaryrefslogtreecommitdiff
path: root/searx/search/checker
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2021-04-14 17:23:15 +0200
committerAlexandre Flament <alex@al-f.net>2021-04-21 16:24:46 +0200
commit7acd7ffc02d14d175ec2a99ba984e47d8cb65d7d (patch)
tree000b6e4b0038ed627bb114f8a2de83681bbf7ad4 /searx/search/checker
parentaae7830d14242ac1f98232f428654c5d2c9c5eb2 (diff)
[enh] rewrite and enhance metrics
Diffstat (limited to 'searx/search/checker')
-rw-r--r--searx/search/checker/impl.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/search/checker/impl.py b/searx/search/checker/impl.py
index 1893a82b9..5cb289ec6 100644
--- a/searx/search/checker/impl.py
+++ b/searx/search/checker/impl.py
@@ -16,6 +16,7 @@ from searx import network, logger
from searx.results import ResultContainer
from searx.search.models import SearchQuery, EngineRef
from searx.search.processors import EngineProcessor
+from searx.metrics import counter_inc
logger = logger.getChild('searx.search.checker')
@@ -384,8 +385,7 @@ class Checker:
engineref_category = search_query.engineref_list[0].category
params = self.processor.get_params(search_query, engineref_category)
if params is not None:
- with self.processor.lock:
- self.processor.engine.stats['sent_search_count'] += 1
+ counter_inc('engine', search_query.engineref_list[0].name, 'search', 'count', 'sent')
self.processor.search(search_query.query, params, result_container, time(), 5)
return result_container