快速多核的TCP和WebSockets负载生成器:TCPkali

jopen 10年前

TCPkali是一个快速多核的TCP和WebSockets负载生成器。


快速示例: 测试一个Web服务器

tcpkali -em "GET / HTTP/1.1\r\nHost: google.com\r\n\r\n" -r 10 --latency-marker "HTTP/1.1" google.com:80
tcpkali --connections 10000 yahoo.com:80 google.com:80
tcpkali -c 10000 yahoo.com:80 google.com:80


快速多核的TCP和WebSockets负载生成器:TCPkali

特性:

  • 高效的多核操作:默认使用所有可用的CPU核数
  • 允许打开数量庞大的连接 (--connections)
  • 允许限制单个连接的吞吐量 (--channel-bandwidthor--message-rate)
  • Allows specifying the first and subsequent messages (--message,--first-message).
  • Measures response latency percentiles using HdrHistogram (--latency-marker)
  • Sends stats to StatsD/DataDog (--statsd)

用法:

Usage: tcpkali [OPTIONS] <host:port> [<host:port>...]  Where OPTIONS are:    -h, --help                  Print this help screen, then exit    --version                   Print version number, then exit    --verbose <level=1>         Verbosity level [0..3]      --ws, --websocket           Use RFC6455 WebSocket transport    -c, --connections <N=1>     Connections to keep open to the destinations    --connect-rate <R=100>      Limit number of new connections per second    --connect-timeout <T=1s>    Limit time spent in a connection attempt    --channel-lifetime <T>      Shut down each connection after T seconds    --channel-bandwidth <Bw>    Limit single connection bandwidth    -l, --listen-port <port>    Listen on the specified port    -w, --workers <N=24>        Number of parallel threads to use    -T, --duration <T=10s>      Load test for the specified amount of time      -e, --unescape-message-args Unescape the following {-m|-f|--first-*} arguments    --first-message <string>    Send this message first, once    --first-message-file <name> Read the first message from a file    -m, --message <string>      Message to repeatedly send to the remote    -f, --message-file <name>   Read message to send from a file    -r, --message-rate <R>      Messages per second to send in a connection      --statsd                    Enable StatsD output (default disabled)    --statsd-host <host>        StatsD host to send data (default is localhost)    --statsd-port <port>        StatsD port to use (default is 8125)    --statsd-namespace <string> Metric namespace (default is "tcpkali")      --latency-marker <string>   Measure latency using a per-message marker    And variable multipliers are:    <R>:  k (1000, as in "5k" is 5000)    <Bw>: kbps, Mbps (bits per second), kBps, MBps (bytes per second)    <T>:  ms, s, m, h, d (milliseconds, seconds, minutes, hours, days)

项目主页:http://www.open-open.com/lib/view/home/1423097973670