Mercurial > urweb
view caching-tests/bench.lua @ 2295:e6c5bb62fef8
Fix SQL parser JOIN bug and fix ON clause logic in Sqlcache.
author | Ziv Scully <ziv@mit.edu> |
---|---|
date | Thu, 19 Nov 2015 03:45:39 -0500 |
parents | 23eaec04e0f8 |
children |
line wrap: on
line source
math.randomseed(os.time()) p = 0.25 n = 2000 function init(args) if args[1] then p = tonumber(args[1]) end if args[2] then n = tonumber(args[2]) end end function request() path = "/Bench/" if math.random() < p then path = path .. "flush" else path = path .. "check" end id = math.random(n) path = path .. "/" .. id return wrk.format(nil, path) end