diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-01-29 09:36:06 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-01-29 09:36:06 +0000 |
| commit | 6f91d3323134319b7d53d3929cfa746930003632 (patch) | |
| tree | f3ecae0735ccf0ba2b73d212204faa5ab6c01588 /roundcubemail/program/include/rcmail.php | |
| parent | d4bb791d44cc06bbab82eb8a8a9ce059f4428e5a (diff) | |
- performance stats logging in devel_mode
git-svn-id: https://svn.roundcube.net/trunk@3237 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcmail.php')
| -rw-r--r-- | roundcubemail/program/include/rcmail.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/roundcubemail/program/include/rcmail.php b/roundcubemail/program/include/rcmail.php index e3c826111..3d26065d5 100644 --- a/roundcubemail/program/include/rcmail.php +++ b/roundcubemail/program/include/rcmail.php @@ -853,6 +853,17 @@ class rcmail // before closing the database connection, write session data if ($_SERVER['REMOTE_ADDR']) session_write_close(); + + // write performance stats to logs/console + if ($this->config->get('devel_mode')) { + if (function_exists('memory_get_usage')) + $mem = show_bytes(memory_get_usage()); + if (function_exists('memory_get_peak_usage')) + $mem .= '/'.show_bytes(memory_get_peak_usage()); + + $log = $this->task . ($this->action ? '/'.$this->action : '') . ($mem ? " [$mem]" : ''); + rcube_print_time(RCMAIL_START, $log); + } } |
