博客
关于我
开源压力测试的小工具Apache 下的ab
阅读量:115 次
发布时间:2019-02-26

本文共 1196 字,大约阅读时间需要 3 分钟。

LoadRunner虽然不是开源工具,但安装Apache服务器后,我们可以使用其内置的开源压力测试工具ab进行性能测试。以下是使用ab进行测试的简单示例和结果分析:

ab -n 10 -c 10 http://www.google.com/

该命令会发送10个请求,并且每次发送10个请求。

Benchmarking (be patient).....done

Server Software: GWS/2.1

Server Hostname:

Server Port: 80

Document Path: /

Document Length: 230 bytes

Concurrency Level: 10

Time taken for tests: 3.234651 seconds

Complete requests: 10

Failed requests: 0

Write errors: 0

Non-2xx responses: 10

Keep-Alive requests: 10

Total transferred: 6020 bytes

HTML transferred: 2300 bytes

Requests per second: 3.09 [#/sec] (mean)

Time per request: 3234.651 [ms] (mean)

Time per request: 323.465 [ms] (mean, across all concurrent requests)

Transfer rate: 1.55 [Kbytes/sec] received

Connection Times (ms)

Connect: 20 318 926.1 30 2954

Processing: 40 2160 1462.0 3034 3154

Waiting: 40 2160 1462.0 3034 3154

Total: 60 2479 1276.4 3064 3184

Percentage of the requests served within a certain time (ms)

50% 3064

66% 3094

75% 3124

80% 3154

90% 3184

95% 3184

98% 3184

99% 3184

100% 3184 (longest request)

注解:

- Apache的bin目录下运行。

格式: ab [options] [http://]hostname[:port]/path

-n requests: 测试的请求数量,默认为1

-c concurrency: 并发请求数量,默认为1

-t timelimit: 最大等待时间,默认为无限制

-w: 以HTML表格形式输出结果

其他选项可参考官方文档。

转载地址:http://czjf.baihongyu.com/

你可能感兴趣的文章
PostgreSQL 10.1 手册_部分 II. SQL 语言_第 15章 并行查询_15.2. 何时会用到并行查询?...
查看>>
PostgreSQL 10.1 手册_部分 II. SQL 语言_第 9 章 函数和操作符_9.23. 行和数组比较
查看>>
PostgreSQL 10.1 手册_部分 III. 服务器管理_第 21 章 数据库角色
查看>>
Qt开发——网络编程UDP网络广播软件之服务器端
查看>>
Postgresql 12.9如何配置允许远程连接
查看>>
PostgreSQL 9.6 同步多副本 与 remote_apply事务同步级别 应用场景分析
查看>>
Postgresql CopyManager 流式批量数据入库
查看>>
PostgreSQL cube 插件 - 多维空间对象
查看>>
PostgreSQL Daily Maintenance - cluster table
查看>>
PostgreSQL on Linux 最佳部署手册
查看>>
PostgreSQL Oracle 兼容性之 - pipelined
查看>>
PostgreSQL Point-In-Time Recovery (Incremental Backup)
查看>>
postgresql Streaming Replication监控与注意事项
查看>>
postgresql 不需要付费_使用数据传输在PostgreSQL执行 外部连接运算符
查看>>
postgresql 主从配置_生产环境postgresql主从环境配置
查看>>
postgresql 函数&存储过程 ; 递归查询
查看>>
PostgreSQL 分组聚合查询中 filter 子句替换 case when
查看>>
PostgreSQL 同步流复制锁瓶颈分析
查看>>
PostgreSQL 备份与还原命令 pg_dump
查看>>
Postgresql 外部表插件postgres_fdw的安装和使用
查看>>