开发者

Is there php benchmarking tool like chrome's timeline

开发者 https://www.devze.com 2023-04-02 01:45 出处:网络
Open google chrome, browsing your favorite website, then right click > open inspect element, and go to timeline ta开发者_StackOverflowb, you can record timeline rendered by google chrome.

Open google chrome, browsing your favorite website, then right click > open inspect element, and go to timeline ta开发者_StackOverflowb, you can record timeline rendered by google chrome.

Is there any php benchmarking tool to retrieve information, get timeline of functions, and variables rendered by webserver?

Thanks.


most known tool is Xdebug.
However, manual code profiling (that's that this thing is called) is no less effective. Just put a few microtime(1) calls into code, analyze output and move them accordingly


Many frameworks have built-in profiling objects. CodeIgniter has a very nice profiling tool you can use:

  • http://codeigniter.com/user_guide/general/profiling.html
  • http://codeigniter.com/user_guide/libraries/benchmark.html

Example:

$this->benchmark->mark('my_mark_start');

// Some code happens here...

$this->benchmark->mark('my_mark_end'); 

$this->benchmark->mark('another_mark_start');

// Some more code happens here...

$this->benchmark->mark('another_mark_end');


I'm using XHProf, which is FB ( ~ 2011 ) developed to replace xdebug. I have attached some screen shots and you can tell if it has what you need :)

Is there php benchmarking tool like chrome's timeline

Is there php benchmarking tool like chrome's timeline

Is there php benchmarking tool like chrome's timeline

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号