autocannon
autocannon copied to clipboard
Request delay
Example:
{
connection: 1,
connectionRate: 1,
duration: 2,
}
Autocannon will perform 1 req/sec for 2 seconds.
{
connection: 1,
connectionRate: 2,
duration: 2,
}
Autocannon will perform 2 req/sec for 2 seconds. But the requests are fired during the very firsts milliseconds.
How can i setup autocannon for fire request every x milliseconds?
I don't understand. Autocannon waits for the previous request to finish before starting the new one.
Using other words: can i fire request with an omogeneous/costant distribution? I want to setup a scenario where the request are sended at same rate during the test duration.
If i set 50 request per second and i draw a graph of number of request over time, i get an "heartbeat": 50 request in 100ms then 900ms of nothing, repeated during time. What I would like is a graph that is ideally an horizontal straight line, one request every 20ms.
Provided that this type of load test makes sense...
Autocannon currently does not support that feature, but feel free to send a PR if you would like to work on it!
Is it still something we want to implement ? I'd be glad to work on it
Go for it!