1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +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

@@ -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)