lua_profile {luajr} | R Documentation |
Get profiling data
Description
After running Lua code with the profiler active (using lua_mode()
), use
this function to get the profiling data that has been collected.
Usage
lua_profile(flush = TRUE)
Arguments
flush |
If |
Details
This function is experimental. Its interface and behaviour may change in subsequent versions of luajr.
Value
An object of class "lua_profile"
.
See Also
lua_mode()
for generating the profiling data.
Examples
## Not run:
lua_mode(profile = TRUE)
pointless_computation = lua_func(
"function()
local s = startval
for i = 1,10^8 do
s = math.sin(s)
s = math.exp(s^2)
s = s + 1
end
return s
end")
lua("startval = 100")
pointless_computation()
lua_mode(profile = FALSE)
prof = lua_profile()
## End(Not run)
[Package luajr version 0.1.9 Index]