hey is a tiny program that provides a simple CLI interface to perform HTTP load testing on your services. It's originally created by rakyll, this repository is a fork intended to add a few additional features, which may slightly alter the original behavior, so if you prefer to use the original version (last compiled a long time ago), please refer to the original repository.
hey comes with a single binary that you can download and run. It is available for Linux, macOS, and Windows. You can download the latest version from the releases page.
Yet you can also install it using go get if you have Go installed on your machine:
go get -u github.com/huseyin/heyOr you can build it from source:
git clone https://github.com/huseyin/hey
cd hey
makeThis will create a binary called hey in bin/ directory. You can move it to one of your $PATH or run it directly from bin/.
-
Simply run
heywith the URL you want to test:hey https://example.com
-
To specify the number of requests, use
-nflag:hey -n 1000 https://example.com
-
To specify the concurrency level, use
-cflag:hey -c 100 https://example.com
-
To specify the HTTP method, use
-mflag (all methods are supported):hey -m GET https://example.com
-
To specify the request body, use
-dflag:hey -d '{"foo": "bar"}' https://example.com -
To specify the request, use
-Hflag:hey -H 'Content-Type: application/json' -H 'Authorization: Bearer token' https://example.com
As shown in the example, you can pass multiple headers by repeating the flag multiple times.
-
To specify the output format, use
-oflag (available formats:csv):hey -o csv https://example.com
-
To enable live output, use
-liveflag:hey -o csv -live https://example.com
This flag is NEW and allows you to stream output in real time, displaying each response as it's received. Note that this is only supported when using the
csvformat. -
For the full list of options, run:
hey -h
See LICENSE for details.
If you want to contribute to this project, please feel free to open an issue or a pull request. All contributions are welcome!
