ProFi, a Lua profiler that works with LuaJIT.
Posted: Wed May 30, 2012 8:38 pm
I've created a simple profiler in response to not being able to get LuaProfiler to work with LoveJIT and some other profile not writing pretty reports.
Here's the Gist: https://gist.github.com/2838755
Example Report: https://gist.github.com/2838786
Here's the Gist: https://gist.github.com/2838755
Code: Select all
--[[
ProFi v1.3, by Luke Perkin 2012. MIT Licence http://www.opensource.org/licenses/mit-license.php.
Example:
ProFi = require 'ProFi'
ProFi:start()
some_function()
another_function()
coroutine.resume( some_coroutine )
ProFi:stop()
ProFi:writeReport( 'MyProfilingReport.txt' )
API:
*Arguments are specified as: type/name/default.
ProFi:start( string/once/nil )
ProFi:stop()
ProFi:checkMemory( number/interval/0, string/note/'' )
ProFi:writeReport( string/filename/'ProFi.txt' )
ProFi:reset()
ProFi:setHookCount( number/hookCount/0 )
ProFi:setGetTimeMethod( function/getTimeMethod/os.clock )
ProFi:setInspect( string/methodName, number/levels/1 )
]]