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
RedFox
  • 111
  • 2

1 Answers1

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.

ratr
  • 101
  • 2