aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/db/driver/mssqlnative.php
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2014-06-14 20:53:34 +0800
committerrxu <rxu@mail.ru>2014-06-20 20:57:32 +0800
commitf850d5fa90584bb73ef1a77fd21f825e1d0794ed (patch)
tree48fcbb6f26577ff4cbd9af5d8d40a93b07ad5e8a /phpBB/phpbb/db/driver/mssqlnative.php
parent7642fbbd63e70c55a033503a428a6b206a29efdf (diff)
downloadforums-f850d5fa90584bb73ef1a77fd21f825e1d0794ed.tar
forums-f850d5fa90584bb73ef1a77fd21f825e1d0794ed.tar.gz
forums-f850d5fa90584bb73ef1a77fd21f825e1d0794ed.tar.bz2
forums-f850d5fa90584bb73ef1a77fd21f825e1d0794ed.tar.xz
forums-f850d5fa90584bb73ef1a77fd21f825e1d0794ed.zip
[ticket/12704] Improve the load time information in the footer when enabled
PR #2570 has added new constant to display load time information without debug mode is being on (https://tracker.phpbb.com/browse/PHPBB3-12687). This patch expands the total load time info with SQL/PHP load times, while hiding the additional info with <abbr> element. PHPBB3-12704
Diffstat (limited to 'phpBB/phpbb/db/driver/mssqlnative.php')
-rw-r--r--phpBB/phpbb/db/driver/mssqlnative.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/phpBB/phpbb/db/driver/mssqlnative.php b/phpBB/phpbb/db/driver/mssqlnative.php
index 9639bfa988..dbeef7e0d7 100644
--- a/phpBB/phpbb/db/driver/mssqlnative.php
+++ b/phpBB/phpbb/db/driver/mssqlnative.php
@@ -127,6 +127,10 @@ class mssqlnative extends \phpbb\db\driver\mssql_base
{
$this->sql_report('start', $query);
}
+ else if (defined('PHPBB_DISPLAY_LOAD_TIME'))
+ {
+ $this->curtime = microtime(true);
+ }
$this->last_query_text = $query;
$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
@@ -145,6 +149,10 @@ class mssqlnative extends \phpbb\db\driver\mssql_base
{
$this->sql_report('stop', $query);
}
+ else if (defined('PHPBB_DISPLAY_LOAD_TIME'))
+ {
+ $this->sql_time += microtime(true) - $this->curtime;
+ }
if ($cache && $cache_ttl)
{