php xhprof安装使用记录.docx

  1. 1、本文档共5页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
php xhprof安装使用记录

php xhprof安装使用记录安装XHProf:wget /get/xhprof-0.9.2.tgztar zxf xhprof-0.9.2.tgzcd xhprof-0.9.2cp -r xhprof_html xhprof_lib directory_for_htdocscd extensionphpize./configuremakemake install编辑php.ini:[xhprof]extension=xhprof.so;; directory used by default implementation of the iXHProfRuns; interface (namely, the XHProfRuns_Default class) for storing; XHProf runs.;xhprof.output_dir=directory_for_storing_xhprof_runs??然后重启php-fpm,或者apache之类。?nginx配置段样例:???? server??? {??????? listen?????? 80;??????? server_name? ;??????? root?? /home/www/myhtdocs/xhprof_html;??????? #charset koi8-r;??????? location ~ .*\.(php|php5)?$??????? {??????????????? #fastcgi_pass? unix:/tmp/php-cgi.sock;??????????????? fastcgi_pass? :9000;??????????????? fastcgi_index index.php;??????????????? include fastcgi.conf;??????? }??????? location /??????? {??????????????? index index.php;??????????????? if (!-e $request_filename)??????????????? {??????????????????? rewrite ^(.*)$ /index.php last;??????????????? }???????? }?? }??? ?术语表Inclusive?Time (或子树执行时间)?:[包括子树执行时间的所有执行时间。]Exclusive Time/Self Time?:[函数执行本身的时间花费。]不包括子树执行时间。Wall时间?:又名经过的时间或挂钟时间。CPU时间?: CPU时间在用户空间+ CPU时间在内核空间?特殊函数的命名约定main():一个虚构的函数,这是所有调用的根节点。load::filename 和 run_init::filename: XHProf 跟踪PHP的include/require操作,和跟踪函数调用一样。例如,?include “lib/common.php;?操作看起来像调了两个XHProf函数:load::lib/common.php?- 内核加载和编译文件的工作。[注:如果您使用的了PHP的opcode 缓存比如APC之类的,只有当缓存失效时才会去编译。run_init::lib/common.php?-由于包含操作引起的初始化操作等。foo@n?:意味着这是一个foo()函数的递归调用。n代表递归深度。递归可能是直接的,(比如由于foo()?--?foo()?),也可能是间接的(如由于foo()-?goo()?-foo()。?从用户界面中访问各次运行一)看单一运行报告要查看run id是run_id和命名空间是namespace的报告,访问URL:http://xhprof-ui-address/index.php?run=run_idsource=namespace例如,http://xhprof-ui-address/index.php?run=49bafaa3a3f66source=xhprof_foo二)查看diff报告要查看命名空间namespace下runid分别是 run_id1和run_id2的两个报告,访问URL:http://xhprof-ui-address/index.php?run1=run_id1run2=run_id2source=namespace三)汇总报告您也可以指定一组run id来汇总得到您想要的报告视图。如果你有三个XHProf运行,都在benchmark‘命名空间下,run id分别是1,2,3。要查看这些运行的汇总报告:http://xhprof-ui-address/index.php?

您可能关注的文档

文档评论(0)

ranfand + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档