-- S2: single-route GET with full middleware (logger + request_id + auth). -- :id is spread across 10_000 values to defeat per-id caching. -- Locate common.lua next to this script regardless of cwd. wrk runs with cwd -- at the repo root, where 'common' is not on package.path; without this the -- require fails and wrk silently falls back to its default request (GET / with -- no auth -> 100% non-2xx). package.path = (debug.getinfo(1, "S").source:match("^@(.*[/\\])") or "./") .. "?.lua;" .. package.path local common = require("common") wrk.method = "GET" wrk.headers = common.headers math.randomseed(os.time() + (os.getpid and os.getpid() or 0)) request = function() local id = math.random(1, 10000) return wrk.format(nil, "/api/v1/users/" .. id) end