Skip to content

Instantly share code, notes, and snippets.

View yaronish's full-sized avatar

Yaroslav Onischenko yaronish

View GitHub Profile
@yaronish
yaronish / sql_profiling.php
Created February 24, 2017 11:55 — forked from mslabko/sql_profiling.php
Enable sql profiling for Magento2
<?php
/**
* Enable sql profiling for each page.
*
* Put code to index file in two parts
*/
// place it BEFORE application run
$profiler = \Magento\Framework\App\ObjectManager::getInstance()
->get('Magento\Framework\App\ResourceConnection')