genaker/profiler

DIV block

Installs: 8

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 3

Forks: 0

Open Issues: 0

Type:magento2-module

7.0.1 2021-08-03 01:46 UTC

This package is auto-updated.

Last update: 2024-04-16 14:09:32 UTC


README

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