Forrest logo
tool overview
On this page you find all important commands for the CLI tool wrk. If the command you are looking for is missing please ask our AI.

wrk

wrk is a modern command line tool used for HTTP benchmarking and load testing. It is written in C and developed by William Morgan.

wrk is highly praised for its speed, efficiency, and flexibility, making it a popular choice among developers and system administrators. It is designed to provide accurate and detailed performance metrics of web applications under high load conditions.

The tool supports both single-threaded and multi-threaded modes, allowing for easy scalability and accurate testing of concurrent connections. It utilizes a simple yet powerful Lua scripting interface, enabling users to customize requests and simulate real-world scenarios.

wrk allows users to specify the desired request rate, number of connections, and duration of the test, making it highly customizable. It provides detailed statistics including request rate, latency percentiles, and throughput, allowing users to analyze performance bottlenecks and identify areas for improvement.

By default, wrk uses a persistent HTTP connection to minimize connection setup overhead, offering more realistic testing conditions. It supports both HTTP and HTTPS protocols, allowing users to test secure applications as well.

wrk is often utilized in continuous integration and deployment pipelines to ensure web applications can handle expected loads. Its simplicity and ease of use make it a tool of choice for testing and validating the performance of various web services and APIs.

Overall, wrk is a powerful and versatile command line tool for benchmarking and load testing HTTP applications, providing accurate performance metrics and enabling users to tune and optimize their web applications for optimal scalability and performance.

List of commands for wrk:

  • wrk:tldr:318c1 wrk: Run a benchmark with a request timeout of `2` seconds.
    $ wrk -t${2} -c${5} -d${5s} --timeout ${2s} "${http:--example-com-index-html}"
    try on your machine
    explain this command
  • wrk:tldr:77796 wrk: Run a benchmark for `30` seconds, using `12` threads, and keeping `400` HTTP connections open.
    $ wrk -t${12} -c${400} -d${30s} "${http:--127-0-0-1:8080-index-html}"
    try on your machine
    explain this command
  • wrk:tldr:aca9c wrk: Run a benchmark with a custom header.
    $ wrk -t${2} -c${5} -d${5s} -H "${Host: example-com}" "${http:--example-com-index-html}"
    try on your machine
    explain this command
tool overview