Commit a78d6462 authored by Dominik Hebeler's avatar Dominik Hebeler

implemented a query counter

parent 0d18a426
...@@ -125,6 +125,8 @@ class MetaGerSearch extends Controller ...@@ -125,6 +125,8 @@ class MetaGerSearch extends Controller
$registry = \Prometheus\CollectorRegistry::getDefault(); $registry = \Prometheus\CollectorRegistry::getDefault();
$counter = $registry->getOrRegisterCounter('metager', 'result_counter', 'counts total number of returned results', []); $counter = $registry->getOrRegisterCounter('metager', 'result_counter', 'counts total number of returned results', []);
$counter->incBy(sizeof($metager->getResults())); $counter->incBy(sizeof($metager->getResults()));
$counter = $registry->getOrRegisterCounter('metager', 'query_counter', 'counts total number of search queries', []);
$counter->inc();
return $resultpage; return $resultpage;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment