minetest_docs
minetest_docs copied to clipboard
Document profiler
As well as other profiling methods (LuaJIT, simply wrapping in get_us_time etc)
I guess it's about time I pushed this for people to use.
Indeed we should mention Lua (debug)-based solutions like https://github.com/charlesmallah/lua-profiler.
Some possibly useful resources:
- dev wiki:
- https://dev.minetest.net/Lua_Optimization_Tips
- https://dev.minetest.net/minetest.get_us_time
- https://dev.minetest.net/Development_Tools#Benchmarking
- https://dev.minetest.net/Profiler_graph
- luajit stuff:
- Website:
- seems a bit outdated: https://luajit.org/index.html
- luajit 2.0 git doc: https://repo.or.cz/luajit-2.0.git/blob_plain/HEAD:/doc/luajit.html
- luajit 2.1 git doc: https://repo.or.cz/luajit-2.0.git/blob_plain/refs/heads/v2.1:/doc/luajit.html
- The profiler: https://repo.or.cz/luajit-2.0.git/blob_plain/refs/heads/v2.1:/doc/ext_profiler.html
- wiki: http://wiki.luajit.org/Home#performance-tuning-and-testing
- Note that there are also eg. the
"jit.v","jit.dump"and"jit.p"modules (you'll need to disable mod security). Dumping the compiler output can be useful to avoid not-yet-implementeds (NYIs, http://wiki.luajit.org/NYI) and to see what your code results in. Dumping can also be done in the web: https://luajit.me/
- Website:
- builtin profiler:
- I haven't really found any doc about this so far IIRC, and I have never completely understood its output. Your only choice might be to RTFS: https://github.com/minetest/minetest/tree/master/builtin/profiler