Created
March 9, 2015 22:57
-
-
Save lpereira/ba8433bcd69ec8da6536 to your computer and use it in GitHub Desktop.
Pipeline benchmark
This file contains hidden or 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
#!/bin/sh | |
exec wrk -H 'Host: localhost' \ | |
-H 'Accept: text/plain,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \ | |
-H 'Connection: keep-alive' \ | |
-d 10 \ | |
-c 1000 \ | |
--timeout 16384 \ | |
-t 4 \ | |
http://127.0.0.1:8080/hello \ | |
-s ./pipelined_get.lua -- 16 |
This file contains hidden or 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) | |
wrk.init(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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment