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')
<?php
$file = 'bundle.csv';
$columns = [
'sku', 'name', 'store_view_code', 'attribute_set_code', 'product_type', 'categories', 'product_websites',
'bundle_price_type', 'bundle_sku_type', 'bundle_price_view', 'bundle_weight_type', 'bundle_values', 'bundle_shipment_type'
];
$productsNumber = 30;
$optionsNumber = 5;
$itemsInOption = 100;
$data = [];