Explorar o código

Added memory peak to the internal profiling instrumentation

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@799 a333f486-631f-4898-b8df-5754b55c2be0
romainq %!s(int64=14) %!d(string=hai) anos
pai
achega
e1fdb36506
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      core/kpi.class.inc.php

+ 5 - 0
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();