Created
July 9, 2018 12:25
-
-
Save 2vg/1a683fa6a75ce166c206fe6348353050 to your computer and use it in GitHub Desktop.
techempower plaintext pipeline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
usage: | |
./pipeline.sh connection threads url | |
example: | |
./pipeline.sh 256 8 http://localhost:8080/plaintext |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
init = function(args) | |
local r = {} | |
local depth = tonumber(args[1]) or 1 | |
for i=1,depth do | |
r[i] = wrk.format() | |
end | |
req = table.concat(r) | |
end | |
request = function() | |
return req | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wrk -H "Host: localhost" -H "Accept: Test1234567890123456789012345678901234567890" -H "Connection: keep-alive" --latency -d 10 -c $1 --timeout 8 -t $2 $3 -s pipeline.lua -- $2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment