a http load testing tool in go
file path: example/fasthttp/main.go
benchmark := ultron.NewFastHTTPAttacker("fasthttp-benchmark")
benchmark.Prepare = func() *fasthttp.Request {
req := fasthttp.AcquireRequest()
req.SetRequestURI("http://192.168.1.30")
return req
}
task := ultron.NewTaskSet()
task.MinWait = ultron.ZeroDuration
task.MaxWait = ultron.ZeroDuration
task.Add(benchmark, 1)
ultron.Runner.Config.Concurrence = 200
ultron.Runner.Config.Requests = 100000
ultron.Runner.Run(task)
{
"fasthttp-benchmark": {
"name": "fasthttp-benchmark",
"requests": 1917994,
"failures": 0,
"min": 0,
"max": 23,
"median": 2,
"average": 2,
"qps": 50211,
"distributions": {
"0.50": 2,
"0.60": 2,
"0.70": 2,
"0.80": 2,
"0.90": 2,
"0.95": 2,
"0.97": 2,
"0.98": 3,
"0.99": 4,
"1.00": 23
},
"failure_details": {},
"full_history": false
}
}