Mercurial
view third_party/wrk/scripts/counter.lua @ 232:7edad9623498 hg-web
[hg-web] Close joined feature branch
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Sun, 02 Aug 2026 16:50:48 -0700 |
| parents | 94705b5986b3 |
| children |
line wrap: on
line source
-- 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