1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

[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
This commit is contained in:
rxu
2014-06-14 20:53:34 +08:00
parent 7642fbbd63
commit f850d5fa90
11 changed files with 82 additions and 2 deletions

View File

@@ -166,6 +166,10 @@ class mysql extends \phpbb\db\driver\mysql_base
{
$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);
@@ -181,6 +185,10 @@ class mysql extends \phpbb\db\driver\mysql_base
{
$this->sql_report('stop', $query);
}
else if (defined('PHPBB_DISPLAY_LOAD_TIME'))
{
$this->sql_time += microtime(true) - $this->curtime;
}
if ($cache && $cache_ttl)
{