HttpBench is a simple utility for bench marking HTTP servers.
- to build yourself, you must have Go v1.13+ installed
Download the latest release here
gopher@localhost→ httpbench
httpbench
Usage:
httpbench --url https://mywebsite.com
httpbench --url https://mywebsite.com --count 100
Options:
-b, --bodyFile string body file in json
-c, --compression compression (default true)
-d, --duration int duration (default 10)
-h, --headers string request headers <string:string>
-i, --insecure insecure
-k, --keepalives keepalives (default true)
-r, --requests int count of requests per second (default 4)
-t, --timeout int timeout (default 10)
-u, --url string url to test
gopher@localhost→ httpbench www.google.com
Making 4 calls per second for 10 seconds...
Finished sending 4 requests...
Finished sending 8 requests...
Finished sending 12 requests...
Finished sending 16 requests...
Finished sending 20 requests...
Finished sending 24 requests...
Finished sending 28 requests...
Finished sending 32 requests...
Finished sending 36 requests...
Finished sending 40 requests...
----------------------------------
Total Requests: 40
Total Time Taken: 7.098961s
----------------------------------
fastest: 80.2569ms
slowest: 825.6611ms
average: 177.474025ms
----------------------------------
20x count: 40
30x count: 0
40x count: 0
50x count: 0
If you need help or find a bug, submit an issue
- Connections
- headers
- url tolower()
- timeout
- statistics
- tests (we don't have 100% code coverage...)
- body
- finish readme
- support custom ports
- support common HTTP methods
- allow user to specify number of concurrent connections or goroutines
- custom user-agent string
- change output format (json, csv, etc.)
- proxy support/proxy authentication
- authentication
- cancellation on long requests (using a context)
- skip SSL validation
- override the host header
- output version
- verbose mode(?)
- improve usage() function
- 1.0.0
- Initial Release
This project is licensed under the MIT License - see the LICENSE.md file for details