diff options
author | rxu <rxu@mail.ru> | 2014-06-14 20:53:34 +0800 |
---|---|---|
committer | rxu <rxu@mail.ru> | 2014-06-20 20:57:32 +0800 |
commit | f850d5fa90584bb73ef1a77fd21f825e1d0794ed (patch) | |
tree | 48fcbb6f26577ff4cbd9af5d8d40a93b07ad5e8a /phpBB/includes/functions.php | |
parent | 7642fbbd63e70c55a033503a428a6b206a29efdf (diff) | |
download | forums-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/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 9d94ef2be4..dd598ec42b 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -5064,10 +5064,10 @@ function phpbb_generate_debug_output(phpbb\db\driver\driver_interface $db, \phpb if (isset($GLOBALS['starttime'])) { $totaltime = microtime(true) - $GLOBALS['starttime']; - $debug_info[] = sprintf('Time: %.3fs', $totaltime); + $debug_info[] = sprintf('<abbr title="SQL time: %.3fs / PHP time: %.3fs">Time: %.3fs</abbr>', $db->sql_time, ($totaltime - $db->sql_time), $totaltime); } - $debug_info[] = $db->sql_num_queries() . ' Queries (' . $db->sql_num_queries(true) . ' cached)'; + $debug_info[] = sprintf('<abbr title="Cached: %d">Queries: %d</abbr>', $db->sql_num_queries(true), $db->sql_num_queries()); $memory_usage = memory_get_peak_usage(); if ($memory_usage) |