Skip to content

Instantly share code, notes, and snippets.

View EngineerSmith's full-sized avatar
🔧
🦆

Engineer Smith EngineerSmith

🔧
🦆
View GitHub Profile
appleCake.setBuffer(false) -- default
appleCake.setBuffer(true)
-- Once true
appleCake.flush()
-- must be manually called for data to be pushed to the file saving thread
local jprof = appleCake.jprof
jprof.enabled(true)
jprof.enabled(false)
appleCake.setThreadName("Server network")
-- Sets the name for the current thread, making it easier to identity
appleCake.setName("EpicGame4004")
-- sets the process and current threads name
appleCake.enable() -- enable everything
appleCake.enable("all")
appleCake.enable("none") -- disable everything
appleCake.enable("profile") -- only enable profiles
appleCake.enable("mark") -- only enable marks
appleCake.enable("counter") -- only enable counters
appleCake.enable(appleCake.enableLevels["profile"] + appleCake.enableLevels["mark"]) -- enable only profiles and marks, disable counters
local jprof = appleCake.jprof
jprof.write()
jprof.write("profile.json")
jprof.write("profile-4/4/4-04:44.json")
local jprof = appleCake.jprof
jprof.push("frame")
jprof.push("update")
jprof.popAll()
local jprof = appleCake.jprof
jprof.pop("Foo")
jprof.pop("Bar")
jprof.pop()
local appleCake = require("lib.AppleCake")(true)
local jprof = appleCake.jprof
appleCake.beginSession() -- or jprof.START(), if you want to only use the jprof table
function love.run()
love.load(love.arg.parseGameArguments(arg), arg)
love.timer.step()
local dt = 0
return function()
local jprof = appleCake.jprof
jprof.push("Foo")
jprof.push("Foo", "Bar")
jprof.push("Foo", love.graphics.getStats())