GithubHelp home page GithubHelp logo

aoepeople / aoe_profiler Goto Github PK

View Code? Open in Web Editor NEW
245.0 72.0 101.0 177 KB

Magento Profiler

Home Page: http://fbrnc.net/blog/2012/08/magento-profiler

License: GNU General Public License v3.0

PHP 81.96% HTML 3.85% CSS 5.74% JavaScript 8.45%

aoe_profiler's Introduction

AOE Profiler

Build Status

http://www.fabrizio-branca.de/magento-profiler.html

For the Magento 2 version of this extension, please visit: https://github.com/perryholden/Holdenovi_Profiler

Usage

Copy the aoe_profiler.xml.sample file to var/aoe_profiler.xml and find some documentation on what the settings mean in that file.

Find some more settings in System > Configuration > Developer > Debug > Profiler.

Enable database profiling

Add this to your local.xml:

<config>
    <global>
        <resources>
            <default_setup>
                <connection>
                    <profiler>1</profiler>
                </connection>
            </default_setup>
        </resources>
    </global>
</config>

Notes

Depending on the complexity of your site a lot of data ends up being collected during a profile run. The first problem with this is that the database table holding this information might be growing. Please double check the cron settings of the cleanup task.

By default MySQL comes with max_allowed_packet set to 1 MB. One profile run could exceed 1 MB. Please check var/system.log for error messages and increase this setting in our MySQL server settings (/etc/mysql/myconf). (Also see: http://dev.mysql.com/doc/refman/5.1/en/packet-too-large.html)

[mysqld]
max_allowed_packet=16M

aoe_profiler's People

Contributors

aadmathijssen avatar bastianccm avatar bobbyshaw avatar colinmollenhour avatar datenbrille avatar fbrnc avatar leesaferite avatar mystix avatar mzeis avatar paales avatar pbrouwers avatar perryholden avatar philwinkle avatar tmotyl avatar vinai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aoe_profiler's Issues

modman warning: Symlink target does not exist

When installing the module using modman, a warning is generated:

modman clone https://github.com/fbrnc/Aoe_Profiler.git
Cloning into Aoe_Profiler...
remote: Counting objects: 125, done.
remote: Compressing objects: 100% (63/63), done.
remote: Total 125 (delta 17), reused 117 (delta 10)
Receiving objects: 100% (125/125), 18.80 KiB, done.
Resolving deltas: 100% (17/17), done.
 Applied: app/etc/modules/*               app/etc/modules/Aoe_Profiler.xml
 Applied: app/code/local/Aoe/Profiler     app/code/local/Aoe/Profiler
 Applied: app/code/local/Varien/Profiler.php  app/code/local/Varien/Profiler.php
WARNING: Symlink target does not exist (.modman/Aoe_Profiler/modman):
 app/design/frontend/base/default/template/aoe_profiler app/design/frontend/base/default/template/aoe_profiler
 Applied: app/design/frontend/base/default/layout/aoe_profiler  app/design/frontend/base/default/layout/aoe_profiler
 Applied: skin/frontend/base/default/aoe_profiler  skin/frontend/base/default/aoe_profiler
Successfully cloned new module 'Aoe_Profiler'

I guess that the template directory is empty and thus not versioned by Git.

Only Admin or catalogsearch route is showing

Hi,

I think i've configured the extension correctly, but in System > AOE Profiler, i only see admin or catalogsearch route.
I upload the aoe_profiler.xml into the var directory with always value in the trigger.
Is the extension need something else to work fine ?

Thanks for your reply !

Create a release once in a while

When using composer to add the Aoe_Profiler module, the only way to add a recent version is to use dev-master. The problem with this is, is that by default composer does not allow caching of individual commits, only for tags.

This can be resolved by creating a release once in a while.

Could you please consider doing this?

Thanks!

BTW I can imagine there is a reason for not creating release tags.

NB It is possible to force composer to cache individual commits (for github at least) by supplying the --prefer-dist option to various composer commands. In my experience however, everyone forgets to do this.

Check if Control.Slider is available

In case

  • scriptaculous/controls.js and/or
  • scriptaculous/slider.js
    were removed from the frontend theme the timer filter does not work and will produce errors.

This should be checked and a message should be displayed instead. The filter (used with the input box) should be still working.

Slow page load and profiler dump feature

Feature request/idea (if I find time I may implement this):

Allow the profiler to be enabled for every request, but nothing should be rendered in the foreground. Instead, if the total page load time exceeds some threshold, the profiler data is dumped to a file in var/profiler using serialize(). Then an admin grid shows a list of these files and their modified times and you can click the row and view the fully rendered profiler data via the admin site. This is something like a slow query log in MySQL and would help identify slow pages or the cause of intermittent slow page loads in production.

To take it further it could be enabled only in certain cases, such as if the request matches a regex, or for some random sampling (e.g. 1% of page loads for really high-traffic sites).

Undefined class constant 'Varien_Profiler::TYPE_DEFAULT'

Getting the following error after installing:

Fatal error: Undefined class constant 'Varien_Profiler::TYPE_DEFAULT' in app\code\core\Mage\Core\Model\Layout.php on line 465


app\code\core\Mage\Core\Model\Layout.php

Platform: Magento Enterprise 1.10.0.2

Page load time in Firebug is nearly double time displayed in profiler

I am loading a product page with all cache's turned off because I'm in development, but the profiler provides a time of 5908ms, but firebug is recording a page load time of 10.12s. On a category page, the profiler states 9702ms, firebug says 16.48s. Could anyone help me understand what could possibly be creating such a significant difference in times? I'm strictly looking at the time to load the page itself. All the static components of the page are being loaded from a cdn. TY

AOE Profiler not logging any url nor showing in footer

Hi,

I'm new to magento and Profiling. I'm trying to install and confirm aoe_profiler but nothing is being logged.

  • I Can see Runs section in System -> AOE Profiles. But no urls being logged.
  • installation is successful, I can see profiler configuration options in System -> Developer -> Debug. I believe issue is with following line "Profiler: Please configure the profiler in var/aoe_profiler.xml. Find a sample configuration file in the module's var directory.". I did configured var/aor_profiler.xml and set proper permissions. and accessing urls with "?profile=1" but nothing is happening.
    Below is the sample configuration file. I didnt not make any changes just changed from aoe_profiler.xml.sample to aoe_profiler.xml

can you please help me fix the issue? I'm using Magento Enterprise 1.14.2.0

Regards,

-Naveed

    <!--
    'always': Every request will be logged (filters apply if enabled...)
    'never': nothing will be logged. (The absence of this xml configuration implies 'never')
    'parameter': controlled via get parameter '?profile=1' or cookie (profile).
    Check System > Configuration for bookmarklets.
    -->
    <trigger>parameter</trigger><!-- 'always', 'parameter', or 'never' -->

    <!--
    If this is set to '0' (and profiling triggered) EVERY request will be logged.
    This may end in a lot of data and in a general performance loss of your site.
    This is only recommended on dev environments.
    If set to '1' the following filters apply.
    -->
    <enableFilters>1</enableFilters>

    <filters>

        <!--
        This controls how many samples will be recorded. Other filters still apply. Examples:
        100 => every request will be logged
        25 => only every fourth request will be logged
        0.01 => only one in 10,000 requests will be logged.
        -->
        <sampling>100</sampling>

        <!--
        Only requests running longer than the configured time will be logged. Set to '0' to log everything. (Other filters still apply)
        -->
        <timeThreshold>0</timeThreshold><!-- in seconds -->

        <!--
        Only requests consuming more than the configured memory will be logged. Set to '0' to log everything. (Other filters still apply)
        -->
        <memoryThreshold>0</memoryThreshold><!-- in bytes -->

        <!--
        Regex pattern for $_SERVER['REQUEST_URI']. If empty the whitelist/blacklist is not active (whitelist will allow everything and blacklist
        won't block anything). The whitelist has a higher priority than the blacklist
        -->
        <requestUriWhiteList><![CDATA[]]></requestUriWhiteList>
        <requestUriBlackList><![CDATA[/^\/index\.php\/hkbackoffice\//]]></requestUriBlackList><!-- this example blocks all admin urls -->
    </filters>

    <!--
    This might slow down page rendering, but will show you the classname
    and the entity id instead of '__EAV_LOAD_MODEL__' only.
    -->
    <captureModelInfo>1</captureModelInfo>

    <!--
    This might slow down page rendering, but will allow you to click on the lines in the profile output
    to make PHPStorm jump to the code (if using the "RemoteCall" plugin)
    -->
    <captureBacktraces>0</captureBacktraces>

</aoe_profiler>

'Invalid block type: Aoe_Profiler_Block_Profiler'

I've installed using modman into my Magento 1.7.0.2 instance. Flushed cache, enabled profiler in index.php and config settings.

However, nothing is shown on the bottom of the page now (the regular profiler did work). And the exception log shows this error. 'Invalid block type: Aoe_Profiler_Block_Profiler'. Any idea where I should look to resolve this?

Looks like the wrong Profiler class is being loaded at this point.

This is crazy... I have Aoe Profiler working on 3 separate instances, and 1 instance just refuses to rewrite the Varien Profiler (I'm assuming thats what this error checks for):

public function persistProfile(Varien_Event_Observer $event) {
    if (!method_exists('Varien_Profiler', 'isEnabled')) {
        Mage::log('Looks like the wrong Profiler class is being loaded at this point.');
        return;
    }

Has anyone else seen this? And what on earth could I do to fix this? No amount of adding/removing is fixing this on 1 of my instances... ?

Profile observer events?

Hi,

I started using Aoe_Profiler and I think it is a great tool to optimize a Magento website (much better than the default one). I have one question, maybe it's possible already.

Take a look at the following output:

profiling-observer

You can see there that the controller_action_predispatch event is taking a significant portion of the time. Exactly 510ms, or 16.49% of the total 3093ms running time.

I know this is a fairly standard Magento event, but I would like to see if any particular observer is taking too much time. Is there a way to do this in Aoe_Profiler?

If not, then it might be a nice enhancement.

Profile cli scripts

Hi,
I made few changes related to profile cli scripts but it looks like this feature is no longer in master branch.
It was removed by dd9fdf9

is it still supported ?

Working in EE 1.14/CE 1.9?

Hi,

Are there any known conflicts with upgrading to EE 1.14 or CE 1.9 using this extension? I see the issue that @davidverholen posted regarding saving customers in the backend. Can anyone else confirm if it is working or not working for them?

Thank you,
Chris

Unable to uninstall or remove Varien and Zend folder

How do I uninstall the profiler? removing all files and running the following doesn't work:

Mage::app()->cleanCache();
Mage::app()->getCacheInstance()->flush(); 
opcache_reset();

It looks to be looking for Varien/Profiler.php still and Zend

Here is error:

Warning: include(/app/code/community/Varien/Profiler.php): failed to open stream: No such file or directory in /lib/Varien/Autoload.php on line 94 
Warning: include(/app/code/community/Varien/Profiler.php): failed to open stream: No such file or directory in /lib/Varien/Autoload.php on line 94 
Warning: include(): Failed opening 'Varien/Profiler.php' for inclusion (include_path='/app/code/local:/app/code/community:/app/code/core:/lib:.:/usr/share/pear:/usr/share/php') in /lib/Varien/Autoload.php on line 94 
Fatal error: Class 'Varien_Profiler' not found in /app/Mage.php on line 665

create new version

since adding the composer.json no version was created, so composer does not know about any "stable" version

Blank page

I am trying to using this module for profile. I have downloaded Zip file and place onto the magento structure. Enabled Profiler using index.php, but when i navigate to homepage it says "Disable profiler first!". Hitting direct url of product page gives me blank page... Nothing logs into exception files...

It;s just login admin url's

Please help if I am missing something...

Can't remove Community/Varien/Profiler.php

Hi
even after uninstalling AOE Profiler i still get:

Warning: include(/var/www/xy/app/code/community/Varien/Profiler.php): failed to open stream: No such file or directory in /var/www/xy/lib/Varien/Autoload.php on line 93

Warning: include(/var/www/xy/app/code/community/Varien/Profiler.php): failed to open stream: No such file or directory in /var/www/xy/lib/Varien/Autoload.php on line 93

Warning: include(): Failed opening 'Varien/Profiler.php' for inclusion (include_path='/var/www/xy/app/code/local:/var/www/xy/app/code/community:/var/www/xy/app/code/core:/var/www/xy/lib:.:/usr/share/php') in /var/www/xy/lib/Varien/Autoload.php on line 93

Fatal error: Uncaught Error: Class 'Varien_Profiler' not found in /var/www/xy/app/Mage.php:665 Stack trace: #0 /var/www/xy/index.php(103): Mage::run('www_gz', 'website') #1 {main} thrown in /var/www/xy/app/Mage.php on line 665

please tell me how to fix this

Profiler doesn't seem to profiling adminhtml

Unlike the documentation states, when I add ?profile=1 to the adminhtml URL, nothing gets profiled. The frontend does however get profiler when I use the same method.

When I set the trigger to always in the configuration it works in the adminhtml.

Magento CE 1.9.1.0

Ignore some routes?

Thinking of using this a bit more but alot of noise from some routes being profiled. Has anyone considered adding a setting so a user can define routes to ignore?

How to disable aoe_profiler?

I have disabled it in local.xml 0 and also in the back office
system > configuration > advanced > advanced > aoe_profiler > disabled
also deleted ./var/aoe_profiler.xml
yet it keeps running.

Row size too large

When profiling on very heavy pages, the profiler will fail to write its data to the table, and will fail with the following message.

Error while saving Aoe_Profiler data: SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.

Although this could be fixed by modifying some settings with the InnoDB engine, I would rather not have to do that just to get the profiler working on a page that I'm trying to cut down anyway.

Would it be possible to get an option to use the old way of displaying the AOE Profiler data at the bottom of the page, and bypass writing to the table?

Incompatible with Mgt_Developertoolbar

It seems the Aoe_Profiler is incompatible with Mgt_Developertoolbar

Fatal error: Call to undefined method Varien_Profiler::fetch() in [...]\app\code\community\Mgt\DeveloperToolbar\Block\Toolbar\Item\Time.php on line 33

Problem here is, it wants to call Varien_Profiler::fetch() which is present in the original Varien_Profiler but not in your version.

Wouldn't it be better if you would use another class name and not override the whole class or at least leave all methods?

MySQL error: SQLSTATE[42S02]: Base table or view not found

Hi all,
i get the following error in my log-file:
2016-03-17T11:05:53+00:00 DEBUG (7): Error while saving Aoe_Profiler data: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'polo_dev.aoe_profiler_run' doesn't exist, query was: DESCRIBE aoe_profiler_run

Please help me.
Thank you.

Cli Support

is Aoe Profiler support cli scripts and if then how it worked

thanks in advanced

Theme name in Run Details

We have 2 themes on website.

It will be great if you will include theme name in Run Details that way we can understand what theme that run belonged too.

Will be handy for run comparison.

Nothing happening

I followed the rather short install notes but nothing seems to happen. How do I know, that it is doing anything? Where would I find any output of the profile run?

How to completely remove?

I noticed others asking how to disable this without a resolution:

#45

Can you please describe how to disable and ideally completely remove it?

Every profiling shows twice entries in runs grid. Is frontend “executed” twice?

Hello!

I'm currently doing some bottleneck hunting on my M1. I've installed AOE Profiler. I do some test on category page.

In the backend (System > AOE Profiler) I noticed there is twice entries at every page run (with a delay of ~3 seconds)!

Is that normal (profiling related)? If not, means my performance problems are probably caused by this...

Thank you for your feedback.

aoeprofiler

cannot save customer in Backend

Hey,

when the validateAction in the AdminHtml CustomerController is called, there is an Exception with the follwing Text:

Notice: Undefined offset: 2 in /var/www/brandung/fe/vendor/aoepeople/aoe_profiler/app/code/community/Varien/Profiler.php on line 85

$attributes = $trace[1]['args'][2];

Profiler: v0.3.0
Magento: 1.9.1.0

I see you already made 41 commits since this release. Maybe it's time for a new stable? ;)

modman file not restrictive enough

Hi Fabrizio,
I want to create a pull request for the modman file because 'app/etc/modules/*' is not restrictive enough. Though I get the feeling you are not maintaining this module because I see some pull requests from months ago. If you still are, let me know.

Regards,
Pascal

SQL Profiling

I don't see SQL queries being profiled by this extension, am I missing something?

progressbar rendering error

Hi

there is something wrong about progress bar margin calculation?
I do not know if is a bug or a misconfiguration

screen shot 2015-11-06 at 06 19 44

screen shot 2015-11-06 at 06 20 18

thanks

Enable profiler only for checkout page?

Is it possible to enable "always" profiler just for the checkout page? There's some kind of misfunction in that page in my website, customers complain but I can't spot the cause. Profiler records will help me a lot.

Warning: Division by zero

Warning: Division by zero  in app/code/community/Aoe/Profiler/Model/Run.php on line 135

#0 app/code/community/Aoe/Profiler/Model/Run.php(135): mageCoreErrorHandler(2, 'Division by zer...', '/Users/andreyza...', 135, Array)
#1 app/code/community/Aoe/Profiler/Model/Run.php(77): Aoe_Profiler_Model_Run->calcRelativeValues()
#2 app/code/community/Aoe/Profiler/Block/Tree.php(140): Aoe_Profiler_Model_Run->processRawData()
#3 app/code/core/Mage/Core/Block/Abstract.php(890): Aoe_Profiler_Block_Tree->_toHtml()
#4 app/code/core/Mage/Core/Block/Abstract.php(609): Mage_Core_Block_Abstract->toHtml()
#5 app/code/core/Mage/Core/Block/Abstract.php(553): Mage_Core_Block_Abstract->_getChildHtml('aoe_profiler_tr...', true)
#6 app/design/adminhtml/default/default/template/aoe_profiler/view.phtml(19): Mage_Core_Block_Abstract->getChildHtml('aoe_profiler_tr...')
#7 app/code/core/Mage/Core/Block/Template.php(247): include('/Users/andreyza...')
#8 app/code/core/Mage/Core/Block/Template.php(279): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#9 app/code/core/Mage/Core/Block/Template.php(293): Mage_Core_Block_Template->renderView()
#10 app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#11 app/code/core/Mage/Adminhtml/Block/Widget/Container.php(308): Mage_Adminhtml_Block_Template->_toHtml()
#12 app/code/core/Mage/Core/Block/Abstract.php(890): Mage_Adminhtml_Block_Widget_Container->_toHtml()
#13 app/code/core/Mage/Core/Block/Text/List.php(46): Mage_Core_Block_Abstract->toHtml()
#14 app/code/core/Mage/Core/Block/Abstract.php(890): Mage_Core_Block_Text_List->_toHtml()
#15 app/code/core/Mage/Core/Block/Abstract.php(609): Mage_Core_Block_Abstract->toHtml()
#16 app/code/core/Mage/Core/Block/Abstract.php(553): Mage_Core_Block_Abstract->_getChildHtml('content', true)
#17 app/design/adminhtml/default/default/template/page.phtml(74): Mage_Core_Block_Abstract->getChildHtml('content')
#18 app/code/core/Mage/Core/Block/Template.php(247): include('/Users/andreyza...')
#19 app/code/core/Mage/Core/Block/Template.php(279): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#20 app/code/core/Mage/Core/Block/Template.php(293): Mage_Core_Block_Template->renderView()
#21 app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#22 app/code/core/Mage/Core/Block/Abstract.php(890): Mage_Adminhtml_Block_Template->_toHtml()
#23 app/code/local/Inchoo/PHP7/Model/Layout.php(15): Mage_Core_Block_Abstract->toHtml()
#24 app/code/core/Mage/Core/Controller/Varien/Action.php(390): Inchoo_PHP7_Model_Layout->getOutput()
#25 app/code/community/Aoe/Profiler/controllers/Adminhtml/ProfilerController.php(130): Mage_Core_Controller_Varien_Action->renderLayout()
#26 app/code/core/Mage/Core/Controller/Varien/Action.php(418): Aoe_Profiler_Adminhtml_ProfilerController->viewAction()
#27 app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('view')
#28 app/code/core/Mage/Core/Controller/Varien/Front.php(174): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#29 app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#30 app/Mage.php(685): Mage_Core_Model_App->run(Array)
#31 index.php(228): Mage::run('', 'store')
#32 {main}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.