_beforeToHtml() || !Mage::getStoreConfig('dev/debug/profiler') || !Mage::helper('core')->isDevAllowed()) { return ''; } $timers = Varien_Profiler::getTimers(); #$out = '
'; #$out = '
'; $out = "[profiler]"; $out .= '
'; $out .= '
Memory usage: real: '.memory_get_usage(true).', emalloc: '.memory_get_usage().'
'; $out .= ''; $out .= ''; foreach ($timers as $name=>$timer) { $sum = Varien_Profiler::fetch($name,'sum'); $count = Varien_Profiler::fetch($name,'count'); $realmem = Varien_Profiler::fetch($name,'realmem'); $emalloc = Varien_Profiler::fetch($name,'emalloc'); if ($sum<.0010 && $count<10 && $emalloc<10000) { continue; } $out .= '' .'' .'' .'' .'' .'' .'' ; } $out .= '
Code ProfilerTimeCntEmallocRealMem
'.$name.''.number_format($sum,4).''.$count.''.number_format($emalloc).''.number_format($realmem).'
'; $out .= '
';
        $out .= print_r(Varien_Profiler::getSqlProfiler(Mage::getSingleton('core/resource')->getConnection('core_write')), 1);
        $out .= '
'; $out .= '
'; return $out; } }