本文整理汇总了PHP中JProfiler::getMemory方法的典型用法代码示例。如果您正苦于以下问题:PHP JProfiler::getMemory方法的具体用法?PHP JProfiler::getMemory怎么用?PHP JProfiler::getMemory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JProfiler
的用法示例。
在下文中一共展示了JProfiler::getMemory方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mark
/**
* Output a time mark
*
* The mark is returned as string but and put in the internal stack
*
* @access public
* @param string A label for the time mark
* @return string Mark text
*/
function mark($label)
{
$mark = $this->_prefix . " {$label}: ";
$mark .= sprintf('%0.1f', ($this->getmicrotime() - $this->_start) * 1000) . ' ms';
$mark .= ', ' . sprintf('%0.2f', parent::getMemory() / 1048576) . ' MB';
$mark .= ', ' . sprintf('%0.2f', (parent::getMemory() - $this->_memstart) / 1048576) . ' MB incr.';
$mark .= ', ' . ($this->_db->getTicker() - $this->_tickerstart) . ' queries';
$this->_buffer[] = $mark;
return $mark;
}
示例2: defined
defined('_JEXEC') or die('Access Denied');
$option = JRequest::getVar('option');
$controller = JRequest::getVar('controller');
$model = JRequest::getVar('model');
$view = JRequest::getVar('view');
$tmpl = JRequest::getVar('tmpl');
$format = JRequest::getVar('format');
$Itemid = JRequest::getInt('Itemid');
//$id = JRequest::getInt('Itemid');
//TODO: REALLY rewrite this performance part in nexts versions
jimport( 'joomla.error.profiler' );
$getmemory = JProfiler::getMemory();
if ($getmemory < 1024){
$memory2 = $mem_usage." bytes";
}
elseif ($getmemory < 1048576){
$memory2 = round($mem_usage/1024,2)." kilobytes";
}
else {
$memory2 = round($getmemory/1048576,2)." megabytes";
};
$pagefox = NULL;
$pagefox .='<div id="jfox_page" style="display:none;">
<fieldset><legend>' . JTEXT::_('Information about this page') . '</legend>'