diff options
author | ubq323 <ubq323@ubq323.website> | 2023-01-27 21:53:57 +0000 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2023-01-27 22:03:22 +0000 |
commit | 9fff52daa2df79133a29ff94d340bdaf406eb514 (patch) | |
tree | ab695c761cd325c76a9607dcba7c5f750e9910fd /client/profile.lua | |
parent | d0916d568a00f5171b96fbc3bfc19ff263affc27 (diff) |
multitudinous things
Diffstat (limited to 'client/profile.lua')
-rw-r--r-- | client/profile.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/client/profile.lua b/client/profile.lua new file mode 100644 index 0000000..e7eab02 --- /dev/null +++ b/client/profile.lua @@ -0,0 +1,12 @@ +local profile = require"jit.profile" +local function start(period,file) + local function cb(thread,samples,vmstate) + file:write(profile.dumpstack(thread,"pF l;",-100), vmstate, " ", samples, "\n") + end + profile.start("vli"..tonumber(period), cb) +end +local function stop() profile.stop() end + + +return {start=start,stop=stop} + |