aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/db/driver/mssql.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/mssql.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/mssql.php')
-rw-r--r--phpBB/phpbb/db/driver/mssql.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/phpBB/phpbb/db/driver/mssql.php b/phpBB/phpbb/db/driver/mssql.php
index 2e56638617..268463a151 100644
--- a/phpBB/phpbb/db/driver/mssql.php
+++ b/phpBB/phpbb/db/driver/mssql.php
@@ -137,6 +137,10 @@ class mssql extends \phpbb\db\driver\driver
{
$this->sql_report('start', $query);
}
+ else if (defined('PHPBB_DISPLAY_LOAD_TIME'))
+ {
+ $this->curtime = microtime(true);
+ }
$this->query_result = ($cache && $cache_ttl) ? $cache->sql_load($query) : false;
$this->sql_add_num_queries($this->query_result);
@@ -152,6 +156,10 @@ class mssql extends \phpbb\db\driver\driver
{
$this->sql_report('stop', $query);
}
+ else if (defined('PHPBB_DISPLAY_LOAD_TIME'))
+ {
+ $this->sql_time += microtime(true) - $this->curtime;
+ }
if ($cache && $cache_ttl)
{