1
0
mirror of https://github.com/wg/wrk synced 2026-05-22 05:41:23 +08:00

add a few example scripts

This commit is contained in:
Will
2013-12-07 14:09:44 +09:00
Unverified
parent 7763ce3c9b
commit 44aa1b4aab
7 changed files with 51 additions and 2 deletions
+14
View File
@@ -0,0 +1,14 @@
-- 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