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 使用的更多相关文章

  1. Lua入门记录

    学习资料 Lua入门和Lua高阶章节 Lua中文文档 阅读笔记,只是记录了知识点和一些注意点,详细的看上面提供的学习资料链接 Lua 基础数据类型 nil(空) boolean(布尔) Lua 中 n ...

  2. 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 ...

随机推荐

  1. linux可运行的shell脚本与设置开机服务启动(自己总结)

    完整的ln命令参考:http://www.runoob.com/linux/linux-comm-ln.html ln :创建连接文件 - 默认创建的是硬连接,好比复制 ,但是两个文件会同步 命令:l ...

  2. Python之协程(coroutine)

    Python之协程(coroutine) 标签(空格分隔): Python进阶 coroutine和generator的区别 generator是数据的产生者.即它pull data 通过 itera ...

  3. linux文件管理 -> 系统目录结构

    几乎所有的计算机操作系统都是用目录结构组织文件.具体来说就是在一个目录中存放子目录和文件, 而在子目录中又会进一步存放子目录和文件,以此类推形成一个树状的文件结构,由于其结构很像一棵树的分支, 所以该 ...

  4. mac设置java环境变量, 使用oh-my-zsh

    参考:http://www.mkyong.com/java/how-to-set-java_home-environment-variable-on-mac-os-x/ 如果用bash,修改~/.ba ...

  5. python+selenium第一步 - 环境搭建

    刚开始学习一门技术,肯定是要从环境搭建开始的,我也不例外. 首先选择需要安装的版本,我使用的是mac自带的2.7版本. selenium2,和火狐浏览器 为求稳定不会出现未知问题,我选择了seleni ...

  6. B树 B+树 红黑树

    B-Tree(B树) 具体讲解之前,有一点,再次强调下:B-树,即为B树.因为B树的原英文名称为B-tree,而国内很多人喜欢把B-tree译作B-树,其实,这是个非常不好的直译,很容易让人产生误解. ...

  7. 在VirtualBox虚拟机中安装Centos操作系统怎么与本地XShell远程连接

    问题: 在VirtualBox安装好了CentOS操作系统后,我们怎么才可以用XSell连接虚拟机中的CentOS呢? 答案: (1)在windows下用cmd--ipconfig查看VirtualB ...

  8. (一)SpringMVC

    第一章 问候SpringMVC 第一节 SpringMVC简介 SpringMVC是一套功能强大,性能强悍,使用方便的优秀的MVC框架 下载和安装Spring框架: 登录http://repo.spr ...

  9. MySQL学习笔记:创建整年日期

    见识到另外一种创意,惊讶! 1.创建小数据表 0-9 # 创建小数据表 DROP TABLE IF EXISTS aa_numbers_small; CREATE TABLE aa_numbers_s ...

  10. Django render函数

    render() 此方法的作用---结合一个给定的模板和一个给定的上下文字典,并返回一个渲染后的 HttpResponse 对象. 通俗的讲就是把context的内容, 加载进templates中定义 ...