I made a version of the Widget Profiler which groups widgets into Game, User and API/Special. You can find it here http://imolarpg.dyndns.org/trac/balates ... ofiler.lua or attached below. I've only tested it with BA (and its included in BA 8.08+).
It also shows the % in varying degree of red, depending on how much time the widgets callins took and if the current FPS is low enough to care. See the code for exact formula, which is a totally subjective piecewise linear function with magic constants that I just made up.
Widget Profiler with moar GUI
Moderator: Moderators
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
Widget Profiler with moar GUI
- Attachments
-
- dbg_widgetprofiler.lua
- (11.8 KiB) Downloaded 42 times
-
- screen00382.jpg
- (1.29 MiB) Downloaded 4 times
Re: Widget Profiler with moar GUI
I tried to look but could not immediately find the formula. Is the formula subjective with regard to the colour formatting or time calculation?Silentwings wrote:
It also shows the % in varying degree of red, depending on how much time the widgets callins took and if the current FPS is low enough to care. See the code for exact formula, which is a totally subjective piecewise linear function with magic constants that I just made up.
+ award for British spelling of colour
Re: Widget Profiler with moar GUI
Looks wonderful! did you consider sorting the results (based on load/alphabetically)?
IIRC capability was already there, just commented out (although I may confuse it with the gadget profiler).
https://gcc.gnu.org/codingconventions.html#Spelling
Even though I prefer British spelling when writing, coding standards go with American English, mainly to make searching for/within files possible (you really don't want to open unknown code and search for both "colour" and "color")
IIRC capability was already there, just commented out (although I may confuse it with the gadget profiler).
https://gcc.gnu.org/codingconventions.html#Spelling
Even though I prefer British spelling when writing, coding standards go with American English, mainly to make searching for/within files possible (you really don't want to open unknown code and search for both "colour" and "color")
Re: Widget Profiler with moar GUI
The issue I have with these widgets/gadgets is that they flood the whole screen if you have many of them. Would be really nice if non-consuming ones could just be removed from list, or set to no alpha if that is easier.
I read that convention and I completely agree. I also prefer British spelling but have started using the standard american "color" because it's in use everywhere.
I read that convention and I completely agree. I also prefer British spelling but have started using the standard american "color" because it's in use everywhere.
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
Re: Widget Profiler with moar GUI
The widgets are sorted alphabetically within each category. I did once sort it by % (years ago, actually) and it wasn't good because they just jump around too much; it's easier to see what's going on with colour. The colour is chosen by the CheckLoad function and the sort function is SortFunc. Feel free to change them, I'm happy as it is :)
Re: Widget Profiler with moar GUI
I think version with bars was better. These % are hard to read and understand. That is why analogue clocks better then digital ones.
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
Re: Widget Profiler with moar GUI
I have never seen a version with bars (and I would prefer to see the numbers, in any case). But I imagine it would be easy to merge the GUI from my version onto the one with bars.
The number is (for each widget) the % of time (out of all the time used by all of Spring, as measured by Spring.DiffTimers) spent by the widgetHandler processing that widgets callins, during a recent time interval & iirc with a little smoothing. The callin in brackets is that widgets most expensive callin.
The number is (for each widget) the % of time (out of all the time used by all of Spring, as measured by Spring.DiffTimers) spent by the widgetHandler processing that widgets callins, during a recent time interval & iirc with a little smoothing. The callin in brackets is that widgets most expensive callin.
Re: Widget Profiler with moar GUI
I've started using this widget profiler and it's been very useful, thanks!