PHP优化工具记录

一,测试工具

  1. ab 大名鼎鼎的基准测试工具

    apache benchmark(ab)是最著名的基准测试工具之一,如果安装了apache,那么现在就可以用它了。

    如果只想安装ab, 而不安装apache, 在ubuntu下使用:

    sudo apt-get install apache2-utils 安装即可

    常用命令:

    ab [options] [full path to web document]

    注意是full path,这就意味着http://localhost/是错的,除非根目录下有index.html或者设置了其他的默认首页,否则必须指定到哪个文件: http://localhost/index.html。

  2. siege 功能比ab更胜一筹

      Siege可以对文本文件中指定的URL列表运行负载测试,其他功能与AB并无太大区别。

      常用命令:

      siege [options] [url]

      具体用法查看siege --help即可


你可能感兴趣的:(PHP优化工具记录)