Mercurial
comparison third_party/wrk/scripts/counter.lua @ 186:8cf4ec5e2191 hg-web
Fixed merge conflict.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Fri, 23 Jan 2026 22:38:59 -0800 |
| parents | 94705b5986b3 |
| children |
comparison
equal
deleted
inserted
replaced
| 176:fed99fc04e12 | 186:8cf4ec5e2191 |
|---|---|
| 1 -- example dynamic request script which demonstrates changing | |
| 2 -- the request path and a header for each request | |
| 3 ------------------------------------------------------------- | |
| 4 -- NOTE: each wrk thread has an independent Lua scripting | |
| 5 -- context and thus there will be one counter per thread | |
| 6 | |
| 7 counter = 0 | |
| 8 | |
| 9 request = function() | |
| 10 path = "/" .. counter | |
| 11 wrk.headers["X-Counter"] = counter | |
| 12 counter = counter + 1 | |
| 13 return wrk.format(nil, path) | |
| 14 end |