Page 1 of 1

New Widget: Profiler

Posted: 09 Oct 2007, 14:07
by MelTraX
I made this for my own but I release it in case some other devs or players are interested..
This 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.
Download

Image

Re: New Widget: Profiler

Posted: 26 Mar 2008, 21:30
by Vadi
Could it please be re-hosted?

Re: New Widget: Profiler

Posted: 27 Mar 2008, 00:16
by LordMatt
You should PM MelTraX directly, has he doesn't read the forums much at all.

Re: New Widget: Profiler

Posted: 27 Mar 2008, 00:34
by det
I've hosted it here for you.

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.

Re: New Widget: Profiler

Posted: 27 Mar 2008, 01:22
by Vadi
Thank you very much!

Re: New Widget: Profiler

Posted: 31 Dec 2008, 00:38
by zwzsg
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 would like to profile KP gadgets.

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

Posted: 01 Apr 2011, 15:26
by ginekolog
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.