aboutsummaryrefslogtreecommitdiff
path: root/www/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/index.php')
-rw-r--r--www/index.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/www/index.php b/www/index.php
index 257ad87..498cf93 100644
--- a/www/index.php
+++ b/www/index.php
@@ -54,8 +54,10 @@ function buildLink($baseLink, $filters, $addFilterType, $addFilterValue)
return $baseLink;
}
+$timeBegin = microtime(true);
$es = new Elasticsearch($GLOBALS['phinde']['elasticsearch']);
$res = $es->search($query, $filters, $page, $perPage);
+$timeEnd = microtime(true);
$pager = new Html_Pager(
$res->hits->total, $perPage, $page + 1,
@@ -84,6 +86,7 @@ foreach ($res->aggregations as $key => &$aggregation) {
render(
'search',
array(
+ 'queryTime' => round($timeEnd - $timeBegin, 2) . 'ms',
'query' => $query,
'hitcount' => $res->hits->total,
'hits' => $res->hits->hits,