Php CPU Cycle Testing

We have ported the important module of the Symfony website from simple PHP.

There are many page pages in this module, and because of this we need to judge the additional hardware requirements (if any). We want to compare additional memory web pages and processor cycles after migration.

Is there any existing tool or function in PHP to get these statistics? I met getrusage function in php, but it does not seem reliable.

+4
source share
5 answers

XDebug can be used to create files and texture calls.

The former explains where the request was spent, the number of function calls, etc. KCacheGrind can be used to verify this data, for example.

Latter can be used to see how certain function paths work, to check the use of memory functions and functions in each function.

+3
source

Symfony and most of the other frameworks I've seen offer a built-in benchmarking system, which ive found very useful.

See if you find this helpful. http://www.markround.com/archives/30-LigHTTPd-and-Apache-Symfony-benchmarks.html

0
source

Instead of benchmarking, you could conduct a stress test on the development server, which is equivalent to production, with equivalent requests per second, for example, Benchmarking Tool . (And don't forget to set the op-code cache).

0
source

enter image description here

Symfony is one of the best frameworks for profiling PHP projects. It has great tools.

Symfony Conf 2010 had a great conversation about your options.

The slideshow is here http://www.slideshare.net/old_sound/debugging-and-profiling-symfony-apps

0
source

See our PHP Profiling Tools . You can get relative calculations with minimal overhead, or you can get time by methods and call trees.

0
source

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


All Articles