Windows 7环境下网站性能测试小工具 Apache Bench 和 Webbench使用和下载
1、简要说明:
Apache Bench 是Apache的网站性能测试小程序,Windows平台下的程序名简称ab.exe,要想获得这个80k的可执行程序,用户需要下载整个Apache Httpd软件包!还需要将其安装到电脑上,确实比较麻烦。
Webbench也是一款网站性能测试小程序,可以获得网站的吞吐率、传送速度等基本性能指标。该程序是在Linux下编程的,在Linux下编译安装使用都很方便,但在Windows 下的程序却没有。
为了方便起见,我将ab.exe 小程序单独拷贝出来,并且下载了webbench的源码,使用CodeBlocks程序和Cygwin64,将源码编译了一下,生成Windows7 环境下可执行的文件webbench.exe ,方便在一个平台下同时使用2个程序,进行网站性能测试。
2、下载地址:
Windows7 64位下的两个网站性能测试小工具下载地址:
链接:https://pan.baidu.com/s/1hDhBlNc4ss_sp-qPYk_kEQ
提取码:upas
3、运行截图:
01-Windows7 64位下webbench测试结果
02-Apache Bench 性能测试小工具-运行参数
03-Apache Bench 性能测试小工具-测试结果1
04-Apache Bench 性能测试小工具-测试结果2
4、测试命令及结果分析
ab.exe -n 15000 -c 100 http://www.abc.com/
# -n 15000总共发送的1.5万个访问请求N个
# -c 100模拟100个用户同时访问C个;
# 结果分析:
# Concurrency Level: 模拟并发用户数(命令行中输入的数据)C个
# Time taken for tests: 完成整个测试的时间T秒
# Requests per second: 服务器性能(在当前并发下每秒能处理的请求数)=N/T个
# Time per request: (mean)从用户的角度计算,每个请求平均花费时间=T/(N/C)
# 解释:每个用户发送N/C个请求,共花费T秒,每个请求平均花费时间=T/(N/C)
# Time per request:(mean, across all concurrent requests)从服务器角度计算,完成每个请求的平均花费时间=T/N
# Transfer rate: 传送速率
webbench.exe -c 100 -t 5 http://www.abc.com/
# -c 100模拟100个用户同时访问;
# -t 5 持续5秒钟测试时间
# 需要测试的网址 http://www.abc.com/ ,注意只测网站名时,结尾要加/
#
# Speed pages/min 每分钟多少个请求, Speed pages/sec 每秒钟多少个请求
# bytes/sec 传送速率
# Requests: 总共完成的请求数
5、注意事项
!!!不要对公共网址发送大量访问请求!!!可用于自己的网站上线前的性能测试。
6、使用帮助
C:\>ab --help
ab: wrong number of arguments
Usage: ab [options] [http://]hostname[:port]/path
Options are:
-n requests Number of requests to perform
-c concurrency Number of multiple requests to make at a time
-t timelimit Seconds to max. to spend on benchmarking
This implies -n 50000
-s timeout Seconds to max. wait for each response
Default is 30 seconds
-b windowsize Size of TCP send/receive buffer, in bytes
-B address Address to bind to when making outgoing connections
-p postfile File containing data to POST. Remember also to set -T
-u putfile File containing data to PUT. Remember also to set -T
-T content-type Content-type header to use for POST/PUT data, eg.
'application/x-www-form-urlencoded'
Default is 'text/plain'
-v verbosity How much troubleshooting info to print
-w Print out results in HTML tables
-i Use HEAD instead of GET
-x attributes String to insert as table attributes
-y attributes String to insert as tr attributes
-z attributes String to insert as td or th attributes
-C attribute Add cookie, eg. 'Apache=1234'. (repeatable)
-H attribute Add Arbitrary header line, eg. 'Accept-Encoding: gzip'
Inserted after all normal header lines. (repeatable)
-A attribute Add Basic WWW Authentication, the attributes
are a colon separated username and password.
-P attribute Add Basic Proxy Authentication, the attributes
are a colon separated username and password.
-X proxy:port Proxyserver and port number to use
-V Print version number and exit
-k Use HTTP KeepAlive feature
-d Do not show percentiles served table.
-S Do not show confidence estimators and warnings.
-q Do not show progress when doing more than 150 requests
-l Accept variable document length (use this for dynamic pages)
-g filename Output collected data to gnuplot format file.
-e filename Output CSV file with percentages served
-r Don't exit on socket receive errors.
-m method Method name
-h Display usage information (this message)
C:\>webbench --help
webbench [option]... URL
-f|--force Don't wait for reply from server.
-r|--reload Send reload request - Pragma: no-cache.
-t|--time <sec> Run benchmark for <sec> seconds. Default 30.
-p|--proxy <server:port> Use proxy server for request.
-c|--clients <n> Run <n> HTTP clients at once. Default one.
-9|--http09 Use HTTP/0.9 style requests.
-1|--http10 Use HTTP/1.0 protocol.
-2|--http11 Use HTTP/1.1 protocol.
--get Use GET request method.
--head Use HEAD request method.
--options Use OPTIONS request method.
--trace Use TRACE request method.
-?|-h|--help This information.
-V|--version Display program version.
Windows 7环境下网站性能测试小工具 Apache Bench 和 Webbench使用和下载的更多相关文章
- Windows XP环境下 搭建Android NDK环境
搭建Android NDK环境 Windows XP环境下 1 一些下载 ① NDK r7:http://developer.android.com/sdk/ndk/index.html ② cygw ...
- [原创]Linux下网络性能测试Netperf工具介绍及安装
[原创]Linux下网络性能测试Netperf工具介绍及安装 1 官方网站 http://www.netperf.org/netperf/ 2 Netperf介绍 Netperf是一种网络性能的测试工 ...
- iOS系统提供开发环境下命令行编译工具:xcodebuild
iOS系统提供开发环境下命令行编译工具:xcodebuild[3] xcodebuild 在介绍xcodebuild之前,需要先弄清楚一些在XCode环境下的一些概念[4]: Workspace:简单 ...
- WP8_(windows phone环境下)上传文件从C#到php接口
在windows phone环境下,将手机上的图片上传到服务端(php环境): 注意事项:在上传的地方,头文件中name,例如name= img,则在php服务端处理时 ,需要约定好 存取一致 php ...
- windows单机环境下配置tomcat集群
场景:我们在平常联系中,需要涉及到tomcat中,但是电脑不够怎么办,肯定是在自己的电脑上模拟集群,就是装多个tomcat,这时候需要稍微配置下.如果是多个服务器,那不用配置,直接怼!!! 这里介绍的 ...
- Android 性能测试小工具 Emmagee
Emmagee 是一个性能测试小工具 用来监控指定被测应用在使用过程中占用机器的CPU, 内存,流量资源的性能小工具 Emmagee 介绍 Emmagee是网易杭州研究院QA团队开发的一个简单易上手的 ...
- 解决Windows x64bit环境下无法使用PLSQL Developer连接到Oracle DB中的问题
本文是原创文章,转载请注明出处: http://blog.csdn.net/msdnchina/article/details/46416455 解决Windows x64bit环境下无法使用PLSQ ...
- [Docker] Windows 宿主环境下,共享或上传文件到容器的方法
需求如题. 解决方案1 - 挂载目录(适用于创建新的容器) 格式-v 容器目录 或 -v 本地目录:容器目录 范例Linux宿主环境下:使用镜像 nginx:latest,以后台模式启动一个容器,将容 ...
- Windows环境下使用Redis缓存工具的图文详细方法
一.简介 redis是一个key-value存储系统.和Memcached类似,它支持存储的value类型相对更多,包括string(字符串).list(链表).set(集合)和zset(有序集合). ...
随机推荐
- 2019.04.23 Scrapy框架
1.环境搭建 2.选择需要的.whl文件下载,一般选择最后的,感觉意思是最近更新的包,以下是.whl文件下载链接地址: http://www.lfd.uci.edu/~gohlke/pythonlib ...
- linux运维需要掌握什么知识?linux运维学习路线
linux运维需要掌握什么知识?这个问题算是老生常谈了,但是本人认为知道需要掌握什么知识不是重点,重点是我们需要知道运维是做什么的?再来根据工作需求去讨论需要学习什么知识才是正途,须知知识是学不完的, ...
- crypto++
CryptoPP库是一个C++书写的加密算法库,很棒. 在如今的抛却数字证书体系下,只关注公私钥对的情况下,我认为存粹的加解密算法库很有市场,虽然我以前觉得PolarSSL的加解密算法实现不错,但不影 ...
- SQL Server get SP parameters and get output fields type information
Summary 本文主要介绍一下,SQL里面的两个很实用的两个操作: 获取存储过程的参数信息 SELECT * FROM INFORMATION_SCHEMA.PARAMETERS WHERE SPE ...
- SpringMVC最直观的流程图
- CF822C Hacker, pack your bags!(思维)
Hacker, pack your bags [题目链接]Hacker, pack your bags &题意: 有n条线段(n<=2e5) 每条线段有左端点li,右端点ri,价值cos ...
- bfs经典
题意:地图上分别用‘.’表示硬地,‘#’表示禁地,‘E’表示易碎地面.你的任务操作一个1*1*2的长方体.长方体有两种状态分别为:立在地面上,躺在地面上.把长方体从入口移动到出口,求需要的最小步数. ...
- flask 虚拟换将安装
1.1. 1.4虚拟环境的安装 1.1.1. 安装虚拟环境 1.1.1.1. 安装 注意:这里必须使用pip3 安装. sudo pip3 install virtualenv sudo pip3 ...
- SSH整合时多表关联查询出现Javassist增强失败
Customer类对应的表为另一个表LinkMan的外键,在进行LinkMan表操作时,出现如下错误. 遇到Javassist增强失败网上说法不一,有的说Customer没有无参构造方法,javass ...
- php魔术变量以及命名空间
魔术变量: PHP 向它运行的任何脚本提供了大量的预定义常量. 不过很多常量都是由不同的扩展库定义的,只有在加载了这些扩展库时才会出现,或者动态加载后,或者在编译时已经包括进去了. 有八个魔术常量它们 ...