apib

A simple, fast HTTP performance-testing tool

  • 所有者: apigee/apib
  • 平台:
  • 许可证: Apache License 2.0
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

apib: API Bench

This is a tool that makes it easy to run performance tests of HTTP API servers. It is built
using Bazel and can be built on most Linux platforms, plus Mac OS X and FreeBSD.

Status

apib has been fairly stable for a little while now. Please submit issues
or pull requests if you find that you'd like it to do more within reason!

Current Version

1.0.

Usage

Running apib can be as simple as:

apib -c 100 -d 60 http://test.example.com

The command above will hammer "test.example.com" as fast as it can for up to
60 seconds using 100 concurrent network connections.

Installation

On the Mac, you can now install via Homebrew:

brew install apib

Otherwise, you can build it yourself from source.

See additional documentation for more:

Design

apib has most of the features of Apache Bench (ab), but is also intended as
a more modern replacement. In particular, it supports:

  • Proper HTTP 1.1 support including keep-alives and chunked encoding
  • Ability to spawn multiple I/O threads to take advantage of multiple
    CPU cores
  • Support for POST and PUT of large objects
  • Support for OAuth 1.0 signatures
  • Ability to output results to a file so they may be automated
  • Remote CPU monitoring

In addition, like "ab," it also supports:

  • A simple command-line interface
  • Few dependencies, so it may be easily built and deployed
  • Non-blocking I/O for high concurrency

Implementation:

  1. Spawn one I/O thread per CPU (configured by user)
  2. Allocate a subset of connections to each, and in each:
  3. Start event loop
  4. If total number of connections < C, spawn a connection
  5. Execute HTTP state machine -- connecting, sending, receiving, sending
  6. When connections close, replace them to maintain C connections open
  7. Record results in a shared area
  8. Back in main thread, report on shared results periodically
  9. Time in main thread and signal workers to stop eventually
  10. Report to screen and to file

主要指标

概览
名称与所有者apigee/apib
主编程语言C++
编程语言Shell (语言数: 7)
平台
许可证Apache License 2.0
所有者活动
创建于2013-06-28 17:50:06
推送于2024-01-18 22:38:10
最后一次提交2020-04-15 12:24:52
发布数7
最新版本名称APIB_1_2_1 (发布于 )
第一版名称APIB_1_0 (发布于 2013-11-07 09:59:40)
用户参与
星数306
关注者数16
派生数33
提交数176
已启用问题?
问题数21
打开的问题数9
拉请求数5
打开的拉请求数1
关闭的拉请求数2
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?