CLI, and reusable Go package, for load testing an HTTP endpoint.
Supports HTTP GET and POST, with headers and body.
Configurable thread count, request per thread, and delays between requests. Outputs the aggregate HTTP status codes frequencies, and latencies.
Examples
# > kurl -url [https://domain/path] -thread 200 -request 10
total: 2000 613Hz
http 200 (OK): 470 23% 144Hz
http 429 (Too Many Requests): 1530 76% 469Hz
duration: 3.265s
latency min: 31ms, avg: 298ms, max: 959ms (std: 153ms)
Use command line argument -pl
to print all latencies to stdout:
# > kurl -url [https://domain/path] -pl -thread 1 -request 50
98 98 97 98 102 109 96 90 102 93 101 99 87 98 91 105 94 107 89 108 95 96 111 94 104 92 98 95 103 86 108 104 94 102 95 95 96 106 97 98 88 91 100 99 93 102 99 98 109 91
Provided you have docker installed, you can run the Kurl CLI without having to build it.
docker pull mipnw/kurl:latest
docker run --rm mipnw/kurl:latest -help
You may also use Kurl inside your Go application:
import "github.com/mipnw/kurl/kurl"
// Launch 100 concurrent HTTP requests
request, _ := http.NewRequest("GET", "https://domain/path", nil)
result := kurl.Do(
kurl.Settings{ThreadCount:100, RequestCount: 1},
*request)
See Go Doc for API reference.
If you have Golang installed, you can build kurl:
scripts/build.sh --release
kurl -help
If you do not have Golang installed, and your OS is [Mac, Linux, Windows] and your architecture x86_64, you can still build Kurl if you have Make and Docker.
make build
bin/kurl -help