tcpulse是TCP/UDP负载生成器,为网络性能测试提供精准控制。
特性
- 支持持久连接和短暂连接两种模式,满足不同场景需求
- 提供实时性能指标,如99%延迟和吞吐量
- 支持多目标测试,可同时对多个端点进行负载测试
用法
$ tcpulse --help
Usage: tcpulse [OPTIONS] <addresses...>
tcpulse is a concurrent TCP/UDP load generator that provides fine-grained, flow-level control
Modes:
-c, --client Run in client mode (connect to servers)
-s, --server Run in server mode (accept connections)
Options:
--addrs-file [client mode] enable to pass a file including a pair of addresses and ports to an argument
-c, --client run in client mode
--connections int32 [client mode] Number of concurrent connections to keep (only for 'persistent') (default 10)
--duration duration [client mode] measurement period (default 10s)
--enable-pprof [client mode] enable pprof profiling
--flavor string [client mode] connect behavior type 'persistent' or 'ephemeral' (default "persistent")
--interval duration [client mode] interval for printing stats (default 5s)
--jsonlines [client mode] output results in JSON Lines format
--listen-addrs-file string [server mode] enable to pass a file including a pair of addresses and ports
--merge-results-each-host [client mode] merge results of each host (with --show-only-results)
--message-bytes int32 [client mode] TCP/UDP message size (bytes) (default 64)
--pprof-addr string [client mode] pprof listening address:port (default "localhost:6060")
--proto string [client mode] protocol (tcp or udp) (default "tcp")
--protocol string [server mode] listening protocol ('tcp' or 'udp') (default "all")
--rate int32 [client mode] New connections throughput (/s) (only for 'ephemeral') (default 100)
-s, --server run in server mode
--show-only-results [client mode] print only results of measurement stats
--version show version information
Examples:
tcpulse -s # Start server on default port 9100
tcpulse -s 0.0.0.0:8080 # Start server on port 8080
tcpulse -c localhost:9100 # Connect to server as client
tcpulse -c --connections 50 host:port # Connect with 50 connections
评论