From: skodak Date: Fri, 15 Feb 2008 11:32:34 +0000 (+0000) Subject: MDL-13484 peak memory used perf info added X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=eebcab610748c27709e0e9163c9d20c898d8c364;p=moodle.git MDL-13484 peak memory used perf info added --- diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 580f4ea34a..b734b9d885 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -7550,6 +7550,12 @@ function get_performance_info() { $info['txt'] .= 'memory_total: '.$info['memory_total'].'B (' . display_size($info['memory_total']).') memory_growth: '.$info['memory_growth'].'B ('.display_size($info['memory_growth']).') '; } + if (function_exists('memory_get_peak_usage')) { + $info['memory_peak'] = memory_get_peak_usage(); + $info['html'] .= 'RAM peak: '.display_size($info['memory_peak']).' '; + $info['txt'] .= 'memory_peak: '.$info['memory_peak'].'B (' . display_size($info['memory_peak']).') '; + } + $inc = get_included_files(); //error_log(print_r($inc,1)); $info['includecount'] = count($inc);