Several procedures for viewing xdebug profile files

Source: Internet
Author: User

In optimizing the efficiency of PHP code execution, it is a good idea to use Xdebug to generate profile files, and then see where the bottleneck of the entire program is. Now there are several xdebug profile viewing procedures, listed here.

Wincachegrind

Wincachegrind is a profile viewer under Windows, and it feels good to use, and sometimes it crashes when profiles are too big.

Today on Gao Chunhui's blog, see these:

Recently began to take Xdebug and Wincachegrind to the project's PHP Code analysis and optimization, but found that the implementation time with their own output is always 10 times times the difference is not a fraction, but 10 times times.

Internet search for a moment, originally in the Xdebug 2.0.0RC4 version began, the profiler log in the time unit has been modified.

("useµseconds instead of a tenths ofµseconds to avoid confusion in profile information." ”)

and wincachegrind no longer upgrade maintenance, so the 2.0.0RC4 and later version of the Xdebug output Profiler log with the Wincachegrind to analyze, there will be 10 times times the gap between the time.

He has provided hack version, can solve the problem of time gap, interested students can try.

Cachegrindvisualizer

Cachegrindvisualizer is a xdebug profile file that looks at the client side and uses Adobe's air production.

A more detailed introduction can be seen in the previous written about Cachegrindvisualizer.

Kcachegrind

Kcachegrind is a graphical profile view tool under Linux and has a strong function.

Callgrind uses runtime instrumentation via the Valgrind framework for its cache simulation and call-graph generation. This way, even shared libraries and dynamically opened plugins can be profiled. The data files generated by Callgrind can is loaded into kcachegrind for browsing the performance results.

Webgrind

Webgrind and Wincachegrind are similar in functionality, but Webgrind is web-based and uses PHP-written viewing tools. Look at the code, running on the Linux server is better.

Webgrind is a Xdebug profiling Web Frontend in PHP5. It implements only a minimal subset of the features of Kcachegrind, but installs in seconds with and works on all platforms. For quick ' n ' dirty optimizations it does the job.

The following is a webgrind view of the phpMyAdmin profile capture:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.