Function for checking PHP profile / performance?

I have no performance issues, however I would like to take a look at how long and how much memory it uses, etc.

I would like to understand firsthand what things can be the neck of bottles, etc., and improve any code that I could use or use ... (perfectionist)

I am looking to create a small function that I can call at the beginning and at the end of each function that writes:

  • lead time
  • memory used
  • cpu require

any ideas?

I did not use such things as memory_get_usage () or time recording methods (), so I would like to get some tips on how to implement them together.

+3
source share
3 answers

, :

XDEBUG EXTENSION FOR PHP

Xdebug Profiler - PHP- , , .

:

PHP Quick Profiler

+2
0

Try using XDebug to debug the code stream. XDebug will generate some file that shows how good your codes are, you can use Kcachegrind to render these files.

0
source

Source: https://habr.com/ru/post/1745554/


All Articles