Skip to content

Instantly share code, notes, and snippets.

@kellabyte
Last active August 29, 2015 14:05
Show Gist options
  • Save kellabyte/c01d5f5e98888d9217b8 to your computer and use it in GitHub Desktop.
Save kellabyte/c01d5f5e98888d9217b8 to your computer and use it in GitHub Desktop.
counter = 0
arguments = {}
init = function(args)
wrk.init(args)
arguments = args
end
request = function()
pipeline_length = tonumber(arguments[1]) or 1
local r = {}
for i=1,pipeline_length do
counter = counter + 1
padded_value = string.format("%010d", counter)
h = {
keyspace = "database",
key = padded_value
}
r[i] = wrk.format("GET", "/", h)
end
req = table.concat(r)
return req
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment