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 :)
精彩评论