原文:http://blog.163.com/yanghe1000@126/blog/static/1181854472012730114159214/ webgrind是一个php 执行时间分析工具,类似于Wincachegrind这个工具,用来分析相关函数的执行时间和相关的性能的,只不过这个是web版的 这个是你安装好wamp之后,自动就安
原文:http://blog.163.com/yanghe1000@126/blog/static/1181854472012730114159214/
webgrind是一个php 执行时间分析工具,类似于Wincachegrind这个工具,用来分析相关函数的执行时间和相关的性能的,只不过这个是web版的
这个是你安装好wamp之后,自动就安装好的,只不过需要加一些配置
打开php.ini文件(这里可得注意了,apache目录下也有php.ini,php目录下也有php.ini,别改错了,无法确定请使用phpinfo()函数查询最终加载的哪个),
xdebug.remote_enable = off xdebug.profiler_enable = off xdebug.profiler_enable_trigger = off xdebug.profiler_output_name = cachegrind.out.%t.%p? xdebug.profiler_output_dir = "e:/wamp/tmp" xdebug.profiler_enable_trigger = on
配置说明:
zend_extension_ts="d:/wamp/bin/php/php5.2.5/ext/xdebug.dll"
加载xdebug模块。这里不能用extension=php_xdebug.dll的方式加载,必须要以zend的方式加载。安装文档上说的。
xdebug.auto_trace=on;
自动打开“监测函数调用过程”的功能模块。该功能可以在你指定的目录中将函数调用的监测信息以文件的形式输出。此配置项的默认值为off。
xdebug.collect_params=on;
打开收集“函数参数”的功能。将函数调用的参数值列入函数过程调用的监测信息中。此配置项的默认值为off。
xdebug.collect_return=on
打开收集“函数返回值”的功能。将函数的返回值列入函数过程调用的监测信息中。此配置项的默认值为off。
xdebug.trace_output_dir="d:/wamp/bin/php/debuginfo"
设定函数调用监测信息的输出文件的路径。
xdebug.profiler_enable=on
通过在URL里传递一个名为XDEBUG_PROFILE的GET变量来触发xdebug的profiler,形如:
http://网址/index.php?XDEBUG_PROFILE
然后打开http://localhost/webgrind/ 点update 就如下图了
原文地址:xdebug webgrind 浅解, 感谢原作者分享。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Atom editor mac version download
The most popular open source editor

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 English version
Recommended: Win version, supports code prompts!
