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 ...
随机推荐
- windebug常用命令
使用~查看所有线程 切换到一号线程:~1s 查看所有线程的托管堆栈 ~* e!clrstack 怎么查看,当前线程下,变量的信息? 对于托管代码而言,最核心的命令就是!do(dump object的 ...
- spring-boot-全局异常
Spring Boot默认的异常处理机制 默认情况下,Spring Boot为两种情况提供了不同的响应方式. 一种是浏览器客户端请求一个不存在的页面或服务端处理发生异常时,一般情况下浏览器默认发送的请 ...
- 排序算法的java实现
冒泡.选择就不写了.很常见 一:插入排序: /** * 插入排序 */ public class P4_3 { static void insertSort(int[] a){ int j,t; /* ...
- oracle字符集查看、修改、版本查看
.1.先查服务端的字符集 或者 2.再查客户端的字符集 两个字符集(不是语言)一致的话就不会乱码了 详细资料 一.什么是Oracle字符集 Oracle字符集是一个字节数据的解释的符号集合,有 ...
- 将网址url中的参数转化为JSON格式
网上方法很多,各种奇技淫巧,这里贴上一种较为正常的思路. 主要利用split对获取的字符串不断进行分割,最后获得所需要的格式. 代码如下 <!DOCTYPE html> <html ...
- Python标准库笔记(7) — copy模块
copy-对象拷贝模块:提供了浅拷贝和深拷贝复制对象的功能, 分别对应模块中的两个函数 copy() 和 deepcopy(). 1.浅拷贝(Shallow Copies) copy() 创建的 浅拷 ...
- Nginx/LVS/HAProxy负载均衡软件的优缺点详解【转】
转自 (总结)Nginx/LVS/HAProxy负载均衡软件的优缺点详解http://www.ha97.com/5646.html PS:Nginx/LVS/HAProxy是目前使用最广泛的三种负载均 ...
- Fiddler 4 抓包(APP HTTPS )
一.手机连接Fiddler 1.配置fiddler 1.安装fiddler,基本下一步下一步即可: 2.打开fiddler,点击顶部栏Tools——>Options 3.在HTTPS页签勾选“D ...
- java 闭包与回调
闭包(closure)是一个可调用的对象,它记录了一些信息,这些信息来自于创建它的作用域. 内部类是面向对象的闭包,因为它不仅包含外围类对象(创建内部类的作用域)的信息,还自动拥有一个指向此外围类对象 ...
- epoll对poll(select)的改进
select的几大缺点: 每次调用select,都需要把fd集合从用户态拷贝到内核态,这个开销在fd很多时会很大: 每次调用select,内核需要遍历传递进来的所有fd(判断检测文件是否可用).有 ...