Loading... <p><strong>Siege为开源免费测压软件</strong></p><p>登陆Siege官网挑选版本<span class="external-link"><a class="no-external-link" href="http://download.joedog.org/siege/" target="_blank"><i data-feather="external-link"></i><a href="http://download.joedog.org/siege/">http://download.joedog.org/siege/</a></span></a></p><pre><code>wget http://download.joedog.org/siege/siege-3.1.0.tar.gz tar -zxvf siege-3.1.0.tar.gz cd siege-3.1.0/ ./configure make && make install ln -s /usr/local/siege/bin/siege /usr/bin/siege </code></pre><p><strong>使用方法:</strong></p><pre><code>-c 200 指定并发数200 -r 5 指定测试的次数5(默认:分钟)+s指定秒数 -f url.txt 指定url的文件 -i internet系统,随机发送url -b 请求无需等待 delay=0 -t 5 持续测试5分钟 # -r和-t一般不同时使用</code></pre><p>-V, --version VERSION, prints the version number.<br> -h, --help HELP, prints this section.<br> -C, --config CONFIGURATION, show the current config.<br> -v, --verbose VERBOSE, prints notification to screen.<br> -q, --quiet QUIET turns verbose off and suppresses output.<br> -g, --get GET, pull down HTTP headers and display the</p><p>-c, --concurrent=NUM CONCURRENT users, default is 10<br> -i, --internet INTERNET user simulation, hits URLs randomly.<br> -b, --benchmark BENCHMARK: no delays between requests.<br> -t, --time=NUMm TIMED testing where "m" is modifier S, M, or Hex: --time=1H, one hour test.<br> -r, --reps=NUM REPS, number of times to run the test.<br> -f, --file=FILE FILE, select a specific URLS FILE.<br> -R, --rc=FILE RC, specify an siegerc file<br> -l, --log[=FILE] LOG to FILE. If FILE is not specified, thedefault is used: PREFIX/var/siege.log<br> -m, --mark="text" MARK, mark the log file with a string.<br> -d, --delay=NUM Time DELAY, random delay before each requstbetween .001 and NUM. (NOT COUNTED IN STATS)<br> -H, --header="text" Add a header to request (can be many)<br> -A, --user-agent="text" Sets User-Agent in request<br> -T, --content-type="text" Sets Content-Type in request</p><p><strong>例:</strong></p><pre><code>siege -c 200 -t 1 www.baidu.com 开始为期1分钟 200并发的请求百度 </code></pre><p><strong>Siege输出结果说明</strong><br>Transactions: 总共测试次数<br>Availability: 成功次数百分比<br>Elapsed time: 总共耗时多少秒<br>Data transferred: 总共数据传输<br>Response time: 等到响应耗时<br>Transaction rate: 平均每秒处理请求数<br>Throughput: 吞吐率<br>Concurrency: 最高并发<br>Successful transactions: 成功的请求数<br>Failed transactions: 失败的请求数</p> 猜你想看 Vue的基本使用与指令 每日一学:PHP 中的array_multisort函数详解 开学啦 什么是朋友? Linux安装Siege Vue学习小案例 JavaScript抽奖 解决 Vue 打包过后 dist 文件夹过大 Vue+axios判断用户名是否被占用 每日一学:PHP 中的array_count_values函数详解 最后修改:2022 年 06 月 05 日 © 允许规范转载 赞 0 如果觉得我的文章对你有用,请随意赞赏