1

I am trying to load test nodejs helloworld, which is running on system 1 at http://10.20.10.10:5000 and I want to pipeline http requests from system 2. wrk takes a script as a parameter. I am wondering what should be in the script pipeline.lua? Just the url?

sample pipeline.lua script.

init = function(args)
   local r = {}
   r[1] = wrk.format(nil, "/?foo")
   r[2] = wrk.format(nil, "/?bar")
   r[3] = wrk.format(nil, "/?baz")

   req = table.concat(r)
end

request = function()
   return req
end
0

Just change the URL. You pipeline script should look something like-

init = function(args)
   local r = {}
   r[1] = wrk.format(nil, "url to test")
   r[2] = wrk.format(nil, "url to test")
   r[3] = wrk.format(nil, "url to test")

   req = table.concat(r)
end

request = function()
   return req
end

This will send three pipelined requests.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.