wrk
wrk copied to clipboard
streaming requests and responses
Hello! Is there an option to test routes which stream content to or from server, e.g. streaming files or bytes?
Now I do
# load.lua
wrk.headers["Accept-Encoding"] = "application/octet-stream"
request = function()
url_path = {...compose_my_path...}
return wrk.format("GET", url_path)
end
and
$ docker run --rm --network=host --env ROUTE={route} -v `pwd`:/data williamyeh/wrk -t4 -c{conn} -d{dur}s --latency --timeout {tout}s -s load.lua http://my_server:port"
Although in Graphana I see 200 responses for requests, in wrk results there are 100% read errors.

Running 1m test @ http://my_server:port
4 threads and 600 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 0.00us 0.00us 0.00us -nan%
Req/Sec 0.00 0.00 0.00 -nan%
Latency Distribution
50% 0.00us
75% 0.00us
90% 0.00us
99% 0.00us
0 requests in 1.00m, 14.35MB read
Socket errors: connect 0, read 48530, write 0, timeout 0
Requests/sec: 0.00
Transfer/sec: 244.75KB
And, as a plus to streaming GET method, I wish to test PUT method, which shall also stream data to server. Is there any option for this? Thank you!