2019-05-10 20:22:41 +02:00
|
|
|
# wrk
|
|
|
|
|
|
|
|
> HTTP benchmarking tool.
|
2019-06-03 02:06:36 +02:00
|
|
|
> More information: <https://github.com/wg/wrk>.
|
2019-05-10 20:22:41 +02:00
|
|
|
|
|
|
|
- Run a benchmark for `30` seconds, using `12` threads, and keeping `400` HTTP connections open:
|
|
|
|
|
2025-04-22 06:20:48 +03:00
|
|
|
`wrk {{[-t|--threads]}} {{12}} {{[-c|--connections]}} {{400}} {{[-d|--duration]}} {{30s}} "{{http://127.0.0.1:8080/index.html}}"`
|
2019-05-10 20:22:41 +02:00
|
|
|
|
|
|
|
- Run a benchmark with a custom header:
|
|
|
|
|
2025-04-22 06:20:48 +03:00
|
|
|
`wrk {{[-t|--threads]}} {{2}} {{[-c|--connections]}} {{5}} {{[-d|--duration]}} {{5s}} {{[-H|--header]}} "{{Host: example.com}}" "{{http://example.com/index.html}}"`
|
2019-05-10 20:22:41 +02:00
|
|
|
|
|
|
|
- Run a benchmark with a request timeout of `2` seconds:
|
|
|
|
|
2025-04-22 06:20:48 +03:00
|
|
|
`wrk {{[-t|--threads]}} {{2}} {{[-c|--connections]}} {{5}} {{[-d|--duration]}} {{5s}} --timeout {{2s}} "{{http://example.com/index.html}}"`
|