Skip to content

Instantly share code, notes, and snippets.

View AVoskoboinikov's full-sized avatar
🇺🇦

Andrii Voskoboinikov AVoskoboinikov

🇺🇦
View GitHub Profile
@mslabko
mslabko / sql_profiling.php
Last active August 17, 2021 21:43
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')
@bwaidelich
bwaidelich / magicMethodBenchmark.php
Created November 6, 2013 11:34
A simple script to compare performance of magic __call methods to real implementations
<?php
class MagicMethodFixture {
/**
* @var array
*/
protected $configurations;
public function __construct() {
$this->configurations = array(