百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
A

autoperf

> 编程语言
开源

httperf 的 Ruby 驱动 - 自动化负载和性能测试

179 stars0 点赞3 次浏览
访问官网GitHub

工具介绍

httperf 的 Ruby 驱动 - 自动化负载和性能测试

For updated version, see: https://github.com/jmervine/autoperf


Autoperf is a ruby driver for httperf, designed to help you automate load and performance testing of any web application - for a single end point, or through log replay. More: http://www.igvita.com/2008/09/30/load-testing-with-log-replay

To get started, first download & install httperf: http://www.hpl.hp.com/research/linux/httperf/

Next, either run a simple test straight from the command line (man httperf), or create an execution plan for autoperf. If you want to replay an access log from your production environment, follow these steps:

grab last 10000 lines from nginx log, and extract a certain pattern (if needed)

tail -n 10000 nginx.log | grep "pattern" > requests

extract the request path (ex. /homepage) from the log file

awk '{print $7}' requests > requests_path

replace newlines with null terminators (httperf format)

tr "\n" "\0" replay_log

Next, configure your execution plan (see sample.conf), and run autoperf: ruby autoperf.rb -c sample.conf

Sample output: +-----------------------------------------------------------------------------+ | rate | conn/s | req/s | replies/s avg | errors | 5xx status | net io (KB/s) | +-----------------------------------------------------------------------------+ | 100 | 99.9 | 99.9 | 99.7 | 0 | 0 | 45.4 | | 120 | 119.7 | 119.7 | 120.0 | 0 | 0 | 54.4 | | 140 | 139.3 | 139.3 | 138.0 | 0 | 0 | 63.6 | |> 160 | 151.9 | 151.9 | 147.0 | 0 | 0 | 69.3 | | 180 | 132.2 | 129.8 | 137.4 | 27 | 0 | 59.6 | | 200 | 119.8 | 117.6 | 139.9 | 31 | 14 | 53.9 | +-----------------------------------------------------------------------------+

If your server uses caching, making it pointless to run the same requests over and over, you can use different requests for each run.

Create 10 1000-line files (xa, xb, xc etc)

split -a 1 requests_path

Convert to null-terminated strings

for x in x?; do tr "\n" "\0" $x.nul; done

run as before, but use the wlog line instead of httperf_wlog in the conf file

ruby autoperf.rb -c sample.conf

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Ruby

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言