Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

use the profiler
 
lkbryant
Member
 
Avatar
Total Posts:  60
Joined:  2007-09-03
 

i noticed that there is a Profiler on the Admin System Config, so I have enabled it.
How can view the results of the profile?

 
Magento Community Magento Community
Magento Community
Magento Community
 
jsperri
Sr. Member
 
Total Posts:  126
Joined:  2007-08-31
Fistufle
 

It seems the log function is disabled by default.
You need to edit the the file /app/Mage.php and comment the first line of code, which is a return;
in the function log($message, $level=Zend_Log::DEBUG, $file = ‘’)

After this modification, the log should go to var/log

Thanks to CapitaineCommerce for the tip smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

The log and profiler are not really connected.

Log is for system debugging messages and will not give any useful information for profiling.

If you have Profiler enabled in Admin / System / Configuration / Developer, you will see a link on the bottom of each page “[Profiler]”, and when you click on it, will expand to table that shows statistics about times, number of execution and memory used for each watched fragment of the code. It will also show profiling statistics for main connection to database and queries.

To add profiling to a fragment of code that is not being watch currently add:

Varien_Profiler::start('NameOfFragmentToProfile');
///... here some code we like to get statistics for
Varien_Profiler::stop('NameOfFragmentToProfile');

If cumulative time of execution for this code is more than .0001 second it will be shown in profiler table with cumulative time, number of executions and cumulative memory consumption.
 
Magento Community Magento Community
Magento Community
Magento Community
 
Georges@Bitbol
Sr. Member
 
Avatar
Total Posts:  104
Joined:  2008-08-07
Paris, France
 

Hi all,

I am on local environment (mac os X, PHP5, Mysql5) and I am truing to activate log and profiler.

I activate them in admin, disable cache.
I have created log directory in 777.

The link for profiler is displayed in bottom of pages but it does not change anything to click (no javascript error).

By default, the memory usage and emallloc information are displayed as well ad profiler information titles such as ‘code profiler’, ‘time’, etc.
But no css, no information above ...

I reinstalled twice magento 1.1.3 and no way to have profiler and logs.

What could it be ?

Thanks in advance.

PS : in attachment, a copy of what is displayed

Image Attachments
Image 1.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
hearsay
Member
 
Total Posts:  72
Joined:  2008-08-04
 

Yes, I’m not seeing any information contained in a table either. My profiler output looks just like your screenshot, . I need this info! Magento is unbearably slow on my LOCAL development server!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Georges@Bitbol
Sr. Member
 
Avatar
Total Posts:  104
Joined:  2008-08-07
Paris, France
 

Ity is slow because you have disable the cache, isn’t it ?
You could find some threads about magento cache optimisation on this forum.
About the profiler, it works now but I do not know what I have made (or not) to enable it.

I know there are no informations on homepage. Try on product page and look at the profiler.

 
Magento Community Magento Community
Magento Community
Magento Community
 
hearsay
Member
 
Total Posts:  72
Joined:  2008-08-04
 

You’re quite right; I had the cache disabled, as one should do when developing! I had just forgotten. Turned it on, and it was a world of difference. Way to build in a highly effective caching system, Magento team! Alright, cache is back off… onto developing.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Matt Dean
Guru
 
Avatar
Total Posts:  549
Joined:  2008-05-27
 

I’m seeing no profiler output either. Same as the two posts above.
I did a few weeks ago using a pre-1.1.3 version of magento, so maybe it’s the upgrade maybe it’s not.

There’s nothing logged suggesting there might be an problem or error, but that’s about par for the course with Magento it seems.

I’ll post here if I work out what’s going on....

 
Magento Community Magento Community
Magento Community
Magento Community
 
Matt Dean
Guru
 
Avatar
Total Posts:  549
Joined:  2008-05-27
 

OK well that was easy enough to fix, but not sure why the problem occured in the first place.

To fix it I went into index.php (in the root dir of your magento install)

and uncommented:

Varien_Profiler::enable();

I might also try uncommenting:

#Mage::setIsDeveloperMode(true);
#ini_set('display_errors', 1);
and see if that does anything exciting. smile

Hope this helps someone anyway!

Matt

 
Magento Community Magento Community
Magento Community
Magento Community
 
herve@wsa
Member
 
Avatar
Total Posts:  48
Joined:  2008-07-22
United Kingdom
 

fantastic.. did not have a clue where to look! thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
magentazm
Jr. Member
 
Total Posts:  29
Joined:  2010-01-31
 

Thank you! Uncommenting in index.php got the profiler working.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top