前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >压力测试工具ab/abs的用法

压力测试工具ab/abs的用法

作者头像
地球流浪猫
发布2019-02-22 09:50:12
3.3K0
发布2019-02-22 09:50:12
举报
文章被收录于专栏:流浪猫的golang流浪猫的golang

ab 是apache 推出的压力测试工具,可以用来测试http服务器的性能,得出QPS abs 则是apache 推出的压力测试工具,可以用来测试https服务器的性能,得出QPS 工具下载地址:https://www.apachehaus.com/cgi-bin/download.plx 工具官方文档地址:http://httpd.apache.org/docs/2.4/programs/ab.html 用法简介:下载工具进入Apache24/bin目录下载就可以看到ab.exe和abs.exe 在命令行中输入

代码语言:javascript
复制
ab -n 1000 -c 20 http://127.0.0.1:8080/

-n 要发多少个请求数 -c 每次进行多少请求 注意:必须是 http://127.0.0.1:8080/ ,“/” 不可以被省略,测试地址必须是一个url。 结果简析:

代码语言:javascript
复制
This is ApacheBench, Version 2.3 <$Revision: 1843412 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:
Server Hostname:        127.0.0.1
Server Port:            8080

Document Path:          /
Document Length:        131 bytes

Concurrency Level:      200
Time taken for tests:   0.990 seconds
Complete requests:      1000
Failed requests:        0
Total transferred:      269000 bytes
HTML transferred:       131000 bytes
Requests per second:    1010.45 [#/sec] (mean)
Time per request:       197.931 [ms] (mean)
Time per request:       0.990 [ms] (mean, across all concurrent requests)
Transfer rate:          265.44 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.4      0       2
Processing:    22  175  33.9    183     218
Waiting:        0   99  54.3    100     216
Total:         22  175  33.9    183     218

Percentage of the requests served within a certain time (ms)
  50%    183
  66%    187
  75%    189
  80%    191
  90%    194
  95%    200
  98%    212
  99%    215
 100%    218 (longest request)

Requests per second: 1010.45 [#/sec] (mean) 就是QPS

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2019年01月08日,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档