From 9728ce82bfda5cada1fb19a921dbf6c34b76d8d6 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Thu, 4 Feb 2016 17:20:23 +0100 Subject: [PATCH] show query time --- data/templates/search/sidebar.htm | 4 ++++ www/index.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/data/templates/search/sidebar.htm b/data/templates/search/sidebar.htm index eaddaeb..8665706 100644 --- a/data/templates/search/sidebar.htm +++ b/data/templates/search/sidebar.htm @@ -5,3 +5,7 @@ {% include 'search/sidebar-filter.htm' with {'type': 'domain', 'title': 'Domain'} %} {% include 'search/sidebar-filter.htm' with {'type': 'language', 'title': 'Language'} %} {% include 'search/sidebar-filter.htm' with {'type': 'type', 'title': 'Type'} %} + +

+ Query took {{queryTime}}. +

diff --git a/www/index.php b/www/index.php index 0412f82..2598a43 100644 --- a/www/index.php +++ b/www/index.php @@ -107,7 +107,7 @@ foreach ($res->aggregations as $key => &$aggregation) { render( 'search', array( - 'queryTime' => round($timeEnd - $timeBegin, 2) . 'ms', + 'queryTime' => round($timeEnd - $timeBegin, 2) . 's', 'query' => $query, 'cleanQuery' => $cleanQuery, 'urlNoSite' => $urlNoSite, -- 2.30.2