DownloadThis is useful for widget devs and players who want to know which widget slows them down..
It just shows all active widgets and the time it takes for some callins (configured with a table in the file) to execute.
Note that it needs to be reloaded whenever you toggle another widget.
New Widget: Profiler
Moderator: Moderators
New Widget: Profiler
I made this for my own but I release it in case some other devs or players are interested..
Last edited by MelTraX on 08 Apr 2008, 22:37, edited 1 time in total.
Re: New Widget: Profiler
Could it please be re-hosted?
Re: New Widget: Profiler
You should PM MelTraX directly, has he doesn't read the forums much at all.
Re: New Widget: Profiler
I would like to profile KP gadgets.det wrote:There is also a a gadget made by jK that can profile both widgets and gadgets but must be included in the mod. You can find it here.
I tried using jK profiler, however:
- First it complained about VFS.Include(SCRIPT_DIR .. 'callins.lua', nil, VFS.ZIP_ONLY) but that was easy to fix.
- Then it complains that 95: attempt to index local 'gh' (a nil value). A few line above it does local gh = gadgetHandler.gadgetHandler
- I tried just replacing it with gh = gadgetHandler but then the profiler doesn't list any gadget.
- jK told me to use CA gadget handlers. (But not what files does that entail precisly.)
- So I copied \LuaRules\*.lua from C.A..
- faction.lua cause issue when outside CA, but that was easy to fix.
- But then most of KP gadgets failed!
- After some investigation I found it was due to GameStart not being called.
- Then TheFatController told me to use BA Chicken Defense gadget handlers, which are based of CA but do have the gamestart called.
- So I did, but then dbg_profiler.lua complained about gh being nil again.
- Then I mixed BACD's gadgets.lua with CA's gadgets.lua, and the profiler worked, but I was back at the profilder listing 0 gadgets using 0.0% FPS, which is obviously wrong.
- As an aside, having to prefix all commands to gadgets by /LuaRules is rather inconvenient. I wish I could type /uprofile instead of /luarules uprofile.
To sum it up, can anyone help me get a gadget profiler that work in a mod other than CA?
Re: New Widget: Profiler
I found that some widgets in ZK make CPU spikes for me.
Do anyone know, how could I detect widget that is making CPU spikes? Widget profiler only shows comulative percentage per widget and i would need graph or usage in ~last second .
TY.
Do anyone know, how could I detect widget that is making CPU spikes? Widget profiler only shows comulative percentage per widget and i would need graph or usage in ~last second .
TY.