1. 前言
通过之前的学习,我们已经了解了各参数以及配置的意义,接下来的文章我们分别从bombardier以及wrk入手,进一步了解彼此之间的联系
2. 认识 bombardier
bombardier 是一个 HTTP(S) 基准测试工具。它是用 Go 编程语言编写的,并使用优秀的fasthttp代替 Go 的默认 http 库,因为它具有闪电般的快速性能,详细文档查看
其支持参数:
-c, --connections=125 Maximum number of concurrent connections
-t, --timeout=2s Socket/request timeout
-l, --latencies Print latency statistics
-m, --method=GET Request method
-b, --body="" Request body
-f, --body-file="" File to use as request body
-s, --stream Specify whether to stream body using chunked
transfer encoding or to serve it from memory
--cert="" Path to the client's TLS Certificate
--key="" Path to the client's TLS Certificate Private Key
-k, --insecure Controls whether a client verifies the server's
certificate chain and host name
-H, --header="K: V" ... HTTP headers to use(can be repeated)
-n, --requests=[pos. int.] Number of requests
-d, --duration=10s Duration of test
-r, --rate=[pos. int.] Rate limit in requests per second
--fasthttp Use fasthttp client
--http1 Use net/http client with forced HTTP/1.x
--http2 Use net/http client with enabled HTTP/2.0
-p, --print=<spec> Specifies what to output. Comma-separated list of
values 'intro' (short: 'i'), 'progress' (short:
'p'), 'result' (short: 'r'). Examples:
* i,p,r (prints everything)
* intro,result (intro & result)
* r (result only)