From a3f4dad24e6fcea2791260ee2d6bad082368eaee Mon Sep 17 00:00:00 2001 From: Romain Quetiez Date: Wed, 8 Sep 2010 20:01:06 +0000 Subject: [PATCH] Added memory peak to the internal profiling instrumentation SVN:trunk[799] --- core/kpi.class.inc.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/kpi.class.inc.php b/core/kpi.class.inc.php index 6822c94e9..64aa10b28 100644 --- a/core/kpi.class.inc.php +++ b/core/kpi.class.inc.php @@ -116,6 +116,11 @@ class ExecutionKPI $iMemory = self::memory_get_usage(); $iMemoryUsed = $iMemory - $this->m_iInitialMemory; $this->Report($sOperationDesc.' / memory: '.self::MemStr($iMemoryUsed).' (Total: '.self::MemStr($iMemory).')'); + if (function_exists('memory_get_peak_usage')) + { + $iMemoryPeak = memory_get_peak_usage(); + $this->Report($sOperationDesc.' / memory peak: '.self::MemStr($iMemoryPeak)); + } } $this->ResetCounters();