Created
July 12, 2019 14:43
-
-
Save sta1r/47ded7a72adb6d4d5f9d5cff6f34ae90 to your computer and use it in GitHub Desktop.
M1 database query profiler
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $profiler = Mage::getSingleton('core/resource')->getConnection('core_write')->getProfiler(); | |
| $profiler->setEnabled(true); | |
| /* | |
| * | |
| * | |
| * | |
| * Code to be analysed | |
| * | |
| * | |
| * | |
| */ | |
| Mage::log(print_r($profiler->getQueryProfiles(), true), null, 'queries.log', true); | |
| $profiler->setEnabled(false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment