From 9fff52daa2df79133a29ff94d340bdaf406eb514 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Fri, 27 Jan 2023 21:53:57 +0000 Subject: multitudinous things --- client/profile.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 client/profile.lua (limited to 'client/profile.lua') 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} + -- cgit v1.2.3