快速多核的TCP和WebSockets負載生成器:TCPkali
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:80tcpkali --connections 10000 yahoo.com:80 google.com:80
tcpkali -c 10000 yahoo.com:80 google.com:80
特性:
- 高效的多核操作:默認使用所有可用的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)
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!