https://github.com/roma-glushko/mage-di-analyzer
🕵️♂️Calculates and reports how Magento modules affect Magento2 DI compilation process and boostrapping process
https://github.com/roma-glushko/mage-di-analyzer
developer-tools magento2 utility
Last synced: 7 months ago
JSON representation
🕵️♂️Calculates and reports how Magento modules affect Magento2 DI compilation process and boostrapping process
- Host: GitHub
- URL: https://github.com/roma-glushko/mage-di-analyzer
- Owner: roma-glushko
- Created: 2020-02-09T06:49:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-27T19:40:55.000Z (over 5 years ago)
- Last Synced: 2025-02-28T08:33:50.756Z (8 months ago)
- Topics: developer-tools, magento2, utility
- Language: PHP
- Homepage:
- Size: 13.7 KB
- Stars: 19
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MageDIAnalyzer
MageDIAnalyzer helps to calculate and report how Magento modules affect Magento2 DI compilation process and boostrapping process.
Features:
- 🚨Calculates how many Kb each modules add to the DI metadata
- 📈Counts how many arguments, preferences, virtual types modules add to DI metadata files## Installation
The process is the same as for any other composer-based project:
```bash
git clone https://github.com/roma-glushko/mage-di-analyzer.git
cd mage-di-analyzer
composer install
```## Usage
Put your project to the production mode and copy DI metadata files from `generated/metadata` to the project `tmp` directory.
Then, MageDIAnalyzer will be able to check the files by running:
```bash
./bin/mage-di-analyzer analyze ./tmp/ -a global -f csv
```## Command Examples
```bash
./bin/mage-di-analyzer analyze ./tmp/ -a global -f csv
./bin/mage-di-analyzer analyze ./tmp/ -a adminhtml -f csv
./bin/mage-di-analyzer analyze ./tmp/ -a frontend -f csv
./bin/mage-di-analyzer analyze ./tmp/ -a crontab -f csv
./bin/mage-di-analyzer analyze ./tmp/ -a webapi_rest -f csv
./bin/mage-di-analyzer analyze ./tmp/ -a webapi_soap -f csv
```## Report Example
| Module Name | Area | Arguments | Argument Size | Preferences | Preference Size | Instance Types | Instance Type Size |
|-------------------|---------|-----------|---------------|-------------|-----------------|----------------|--------------------|
| Magento_Framework | crontab | 1995 | 714.79kB | 335 | 38.44kB | 57 | 6.25kB |
| Magento_Catalog | crontab | 1019 | 531.2kB | 283 | 38.36kB | 23 | 2.87kB |