| Setting up a profiler for your PHP project |
|
Profiling of your PHP coding means that you can create an overview of the performance of your PHP code / project and allows you to detect possible blockades within your code. The profiler analyse your code and creates an overview of the performance within your code. With the profiler you get an insight view which parts of your code can be optimized in relation to performance. Default there is no configuration within the PHP development studio for profiling your code. The enable the profiler you need to add some changes to your PHP ini file which is located under <installation dir>/xampp/apache/bin/php.ini You can add the following settings into your php.ini file to make the profiler work: xdebug.profiler_enable: IMPORTANT NOTICE: only enable this when you want to create a profile overview. If not disable this setting. xdebug.profiler_output_dir: xdebug.profiler_output_name: xdebug.profiler_enable_trigger Once you have setup these settings within your PHP.ini the profile output files can be generated. To analyse the profile information you can use the cachegrind for windows application. This programs will give you detailed information of the generated profile file. You can download the cachegrind application for windows from sourceforge or from our site Once you have installed cachegrind you can view some overview of the generated output files:
With the winCachegrind program you can view/filter/sort and browse through the generated profile information. It can provide you some important information in regards of some bottlenecks within your program code. Also you can use the profiler to analyze for example PHP applications to see how the flow of the code is.
|
