mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
448 B
15 lines
448 B
11 years ago
|
-- example dynamic request script which demonstrates changing
|
||
|
-- the request path and a header for each request
|
||
|
-------------------------------------------------------------
|
||
|
-- NOTE: each wrk thread has an independent Lua scripting
|
||
|
-- context and thus there will be one counter per thread
|
||
|
|
||
|
counter = 0
|
||
|
|
||
|
request = function()
|
||
|
path = "/" .. counter
|
||
|
wrk.headers["X-Counter"] = counter
|
||
|
counter = counter + 1
|
||
|
return wrk.format(nil, path)
|
||
|
end
|