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 ...
随机推荐
- 事件,继承EventArgs带有参数的委托
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...
- OpenStack Benchmark - Rally
作为以基于OpenStack的云平台的基准测试工具 -- Rally, 其功能不仅是测试云的性能&&稳定性, 还可以安装OpenStack,以及以良好的表现形式(web 页面)展现测试 ...
- Django的ContentType框架django_conent_type
Django包含了一个conenttype应用程序,记录了Django项目中安装的所有模型,为当前项目所有基于Django驱动的model提供了更高层次的抽象接口. 一.概述 ContentTypes ...
- HTTP之二 http 301 和 302的区别
1.什么是301转向?什么是301重定向? 301转向(或叫301重定向,301跳转)是当用户或搜索引擎向网站服务器发出浏览请求时,服务器返回的HTTP数据流中头信息(header)中的状态码的一种, ...
- 【Android开发】之MediaPlayer的错误分析
最近在做媒体播放器,使用了Android自带的MediaPlayer,经常性会碰到MediaPlayer报错的情况,找过网上的,感觉总结的不是很好或者比较散.下面,我来总结一下使用MediaPlaye ...
- 01 Go 1.1 Release Notes
Go 1.1 Release Notes Introduction to Go 1.1 Changes to the language Integer division by zero Surroga ...
- Maven 基础知识
Maven MavenMaven 简介 Maven MavenMaven 是 Apache Apache Apache 软件基金会组织维护的 软件基金会组织维护的 软件基金会组织维护的 软件基金会组织 ...
- thinkphp5 IIS7.5 隐藏index.php的方法
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.we ...
- Linux学习笔记:mv移动或文件重命名
mv命令是move的缩写,可以用来移动文件或者将文件改名(move (rename) files),是Linux系统下常用的命令,经常用来备份文件或者目录. 语法:mv 源文件 目标文件 视mv命令中 ...
- Visual Studio 2017 发布 附带下载地址
链接: https://pan.baidu.com/s/1kFjGwyj5HwabvmJKiyLF_g 提取码: 关注公众号[GitHubCN]回复获取 winform框架源码-Devexpre ...