weighttp 使用
Weighttp 地址 http://redmine.lighttpd.net/projects/weighttp/wiki
Weighttp的介绍:weighttp
is a lightweight and small benchmarking tool for webservers。Weighttp只支持HTTP协议的一小部分,因此精艺、简单,使用起来也非常容易、快速。支持多线程,异步IO。
Weighttp的事件驱动依靠libev,支持高性能接口:epoll or kqueue等。
安装
Weighttp安装需要libev,找一个libev-4.04.tar.gz包,解压,configure,make,install就可以了,安装之后最好将库添加到系统链接库中
#yum install libev
或
#wget http://dist.schmorp.de/libev/libev-4.22.tar.gz
[root@localhost ]# echo "/usr/local/lib" >> /etc/ld.so.conf
[root@localhost ]# /sbin/ldconfig
现在开始编译安装Weighttp
tar zxvf weighttp-master.tar.gz
cd weighttp-master
./waf configure
./waf build
./waf install
在任何目录下都可运行直接运行命令:weighttp
[root@server1 ~]# weighttp
weighttp - a lightweight and simple webserver benchmarking tool error: missing url argument weighttp <options> <url>
-n num number of requests (mandatory) 请求数量
-t num threadcount (default: 1)线程数量
-c num concurrent clients (default: 1)并发用户数量
-k keep alive (default: no)长连接,默认短连接
-6 use ipv6 (default: no)Ip6
-H str add header to request 增加消息头Header
-h show help and exit
-v show version and exit example: weighttpd -n 10000 -c 10 -t 2 -k -H "User-Agent: foo" localhost/index.html
Weighttp使用示例
在本机启动一个Web服务器,用Weighttp进行测试,我用的是Jetty7.4
[root@server1 ~]#weighttp -n 1 -k http://192.168.30.13:8080/hello
weighttp - a lightweight and simple webserver benchmarking tool starting benchmark...
spawning thread #1: 1 concurrent requests, 1 total requests progress: 100% done finished in 0 sec, 204 millisec and 32 microsec, 4 req/s, 0 kbyte/s
requests: 1 total, 1 started, 1 done, 1 succeeded, 0 failed, 0 errored
status codes: 1 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 191 bytes total, 141 bytes http, 50 bytes data
几个与Weighttp相似的工具:apache ab,httperf,httpress
weighttp 使用的更多相关文章
- Lua入门记录
学习资料 Lua入门和Lua高阶章节 Lua中文文档 阅读笔记,只是记录了知识点和一些注意点,详细的看上面提供的学习资料链接 Lua 基础数据类型 nil(空) boolean(布尔) Lua 中 n ...
- Error While Loading Shared Libraries, Cannot Open Shared Object File
In the "I wish the Internet had an actual correct answer" category comes a question from a ...
随机推荐
- 【矩阵】RQ/QR 分解
Multiple View Geometry in Computer Vision A.4.1.1 (page 579) 将一个 3x3 矩阵 $ A $ 进行 RQ 分解是将其分解成为一个上三角阵 ...
- LINUX的DNS设置【转】
网卡DNS设置 用windos系统大家都知道,本地连接里面有一个DNS设置. 那么这个选项对应Linux系统的话就是在网卡配置文件,通过编辑vi /etc/sysconfig/network-scr ...
- iOS开发之删除Provisioning Profiles方法
1.在finder下打开go -> go to folder输入: ~/Library/MobileDevice/Provisioning Profiles 2.查看上面的列表,按照时间顺序删除 ...
- 27 Debugging Go Code with GDB 使用GDB调试go代码
Debugging Go Code with GDB 使用GDB调试go代码 Introduction Common Operations Go Extensions Known Issues Tu ...
- ubuntu下将程序挂后台命令
ubuntu下将程序挂后台命令 nohup python -u main.py > test.out 2>&1 & ubunut下查看后台进程 jobs -l
- 一步一步学习IdentityServer4 (5) .NETCore2.0 Swagger
首先添加nuget: Swashbuckle.AspNetCore services.AddSwaggerGen(c => { c.SwaggerDoc("v1", new ...
- day6 xml文件格式的处理
XML处理模块 xml是实现不同语言或程序之间进行数据交换的协议,跟json差不多,但json使用起来更简单,不过,古时候,在json还没诞生的黑暗年代,大家只能选择用xml呀,至今很多传统公 ...
- USACO 6.5 Checker Challenge
Checker Challenge Examine the 6x6 checkerboard below and note that the six checkers are arranged on ...
- 收集Nginx的json格式日志(五)
一.配置nginx [root@linux-node1 ~]# vim /etc/nginx/nginx.conf #修改日志格式为json格式,并创建一个nginxweb的网站目录 log_form ...
- Ionic Js二十:选项卡栏操作
ion-tabs ion-tabs 是有一组页面选项卡组成的选项卡栏.可以通过点击选项来切换页面. 对于 iOS,它会出现在屏幕的底部,Android会出现在屏幕的顶部(导航栏下面). 用法 < ...