From c24e0753fc240636b2f9b1889554649e67c9046c Mon Sep 17 00:00:00 2001 From: sapier Date: Tue, 12 Aug 2014 23:07:27 +0200 Subject: Mod profiling support Config settings: profiling = true/false (gather statistics) detailed_profiling = true/false (break mod times to callbacks) Chat commands: save_mod_profile saves current statistics in debug.txt and shows on console (on default loglevel) --- builtin/game/init.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'builtin/game/init.lua') diff --git a/builtin/game/init.lua b/builtin/game/init.lua index b878a2664..3f82f85c7 100644 --- a/builtin/game/init.lua +++ b/builtin/game/init.lua @@ -7,6 +7,11 @@ dofile(commonpath.."vector.lua") dofile(gamepath.."item.lua") dofile(gamepath.."register.lua") + +if core.setting_getbool("mod_profiling") then + dofile(gamepath.."mod_profiling.lua") +end + dofile(gamepath.."item_entity.lua") dofile(gamepath.."deprecated.lua") dofile(gamepath.."misc.lua") -- cgit v1.2.3