diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2004-09-06 06:23:37 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2004-09-06 06:23:37 +0000 |
commit | d80f8d577ebdc1489b2dcf49bdb9a266d29d1ef1 (patch) | |
tree | 06baca0db33f45cdb0ec12f79e8e9abc94dcf011 /phpBB/includes/functions.php | |
parent | acf25b39a5c1da7e7cce2ddd30448bac3ca7b7b2 (diff) | |
download | forums-d80f8d577ebdc1489b2dcf49bdb9a266d29d1ef1.tar forums-d80f8d577ebdc1489b2dcf49bdb9a266d29d1ef1.tar.gz forums-d80f8d577ebdc1489b2dcf49bdb9a266d29d1ef1.tar.bz2 forums-d80f8d577ebdc1489b2dcf49bdb9a266d29d1ef1.tar.xz forums-d80f8d577ebdc1489b2dcf49bdb9a266d29d1ef1.zip |
- print memory usage if available
git-svn-id: file:///svn/phpbb/trunk@4983 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 461a700c89..33dd4f2295 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1736,6 +1736,16 @@ function page_footer() if ($auth->acl_get('a_')) { + if (function_exists('memory_get_usage')) + { + if ($memory_usage = memory_get_usage()) + { + $memory_usage = ($memory_usage >= 1048576) ? round((round($memory_usage / 1048576 * 100) / 100), 2) . ' ' . $user->lang['MB'] : (($memory_usage >= 1024) ? round((round($memory_usage / 1024 * 100) / 100), 2) . ' ' . $user->lang['KB'] : $memory_usage . ' ' . $user->lang['BYTES']); + + $debug_output .= ' | Memory Usage: ' . $memory_usage; + } + } + $debug_output .= ' | <a href="' . (($_SERVER['REQUEST_URI']) ? htmlspecialchars($_SERVER['REQUEST_URI']) : "index.$phpEx$SID") . ((strstr($_SERVER['REQUEST_URI'], '?')) ? '&' : '?') . 'explain=1">Explain</a>'; } } |