https://github.com/genaker/magentoprofiller
Easy and simple Magneto profiler to find an issues...
https://github.com/genaker/magentoprofiller
Last synced: about 1 year ago
JSON representation
Easy and simple Magneto profiler to find an issues...
- Host: GitHub
- URL: https://github.com/genaker/magentoprofiller
- Owner: Genaker
- License: gpl-3.0
- Created: 2021-07-27T02:54:01.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-03T01:47:13.000Z (almost 5 years ago)
- Last Synced: 2025-03-29T00:31:23.784Z (about 1 year ago)
- Language: PHP
- Size: 25.4 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING.txt
Awesome Lists containing this project
README
# Mage2 Module Genaker Profiler
MAgento profiling profiling is the analysis of various metrics related to code performance and efficiency.
If a Magento Layout Block is taking too much time to complete, it’s a good idea to profile the block to find out the cause.
A very easy and straightforward way to perform this analysis is to use the time() and microtime() functions.
Both these functions return the current Unix Timestamp. time() returns it in seconds, while microtime() returns a float with microseconds too.
To check the execution time of a piece of code you need to:
Save the current time with time() or with microtime() before the code you want to profile.
After the code, call time() or microtime() again and calculate the difference from the previously saved value.
That is the execution time in seconds
# Install composer
```
composer require genaker/profiler
```