TYPO3 CMS  TYPO3_6-2
MonitorUtility.php
Go to the documentation of this file.
1 <?php
2 namespace TYPO3\CMS\Core\Utility;
3 
22 
28  static public function peakMemoryUsage() {
29  $peakUsage = memory_get_peak_usage(TRUE);
30  $memoryLimit = \TYPO3\CMS\Core\Utility\GeneralUtility::getBytesFromSizeMeasurement(ini_get('memory_limit'));
31  if (is_double($memoryLimit) && $memoryLimit != 0) {
32  if ($peakUsage / $memoryLimit >= 0.9) {
35  $data = array(
36  'used' => $peakUsage,
37  'tstamp' => $GLOBALS['EXEC_TIME'],
38  'url' => \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL')
39  );
40  $registry->set('core', 'reports-peakMemoryUsage', $data);
41  }
42  }
43  }
44 
45 }
$registry
Definition: ext_tables.php:46
static getBytesFromSizeMeasurement($measurement)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]