Loading…
None
New source string testing_project / Documentation: reference/tooling/luajit_memprof — English |
Things to check
Glossary
| English | English | ||
|---|---|---|---|
| No related strings found in the glossary. | |||
Loading…
None
New source string testing_project / Documentation: reference/tooling/luajit_memprof — English |
| English | English | ||
|---|---|---|---|
| No related strings found in the glossary. | |||
local log = require "log"
fiber.create(function()
fiber.name("memprof")
collectgarbage() -- Collect all objects already dead
log.warn("start of profile")
local st, err = misc.memprof.start(FILENAME)
if not st then
log.error("failed to start profiler: %s", err)
end
fiber.sleep(TIME)
collectgarbage()
st, err = misc.memprof.stop()
if not st then
log.error("profiler on stop error: %s", err)
end
log.warn("end of profile")
end)