Browse Source

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 14 năm trước cách đây
mục cha
commit
e1fdb36506
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  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();