PHP - 性能测试工具

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wyansai/article/details/81814395

PHP性能测试工具

安装

1、mongodb服务及扩展

  • 使用pecl安装,需要php-dev和pcre服务
  • sudo apt-get install mongodb
  • sudo pecl install mongodb
  • 编辑php.ini,添加extension=mongodb.so

2、xhprof扩展安装

3、xhgui安装

4、nginx配置


  • 在项目的server配置中php解析配置里加入下列代码

目的是为了自动include “header.php”文件
fastcgi_param TIDEWAYS_SAMPLERATE "25";
fastcgi_param PHP_VALUE "auto_prepend_file=/www/xhgui/external/header.php";


  • 为xhgui的web单独设置一个虚拟机

必须重置路由
location / {
    try_files $uri $uri/ /index.php?$uri&$args;
}

猜你喜欢

转载自blog.csdn.net/wyansai/article/details/81814395