| 12345678910111213141516171819202122232425262728293031323334 | local pipelineDepth = 1local counter = 0local maxRequests = -1function init(args)   if args[1] ~= nil then      pipelineDepth = tonumber(args[1])   end   local r = {}   for i = 1, pipelineDepth, 1 do      r[i] = wrk.format(nil)   end   print("Pipeline depth: " .. pipelineDepth)   if args[2] ~= nil then      maxRequests = tonumber(args[2])      print("Max requests: " .. maxRequests)   end   req = table.concat(r)endfunction request()   return reqendfunction response()   if counter == maxRequests then     wrk.thread:stop()   end   counter = counter + 1end
 |