Widget Profiler with moar GUI

Widget Profiler with moar GUI

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Widget Profiler with moar GUI

Post by Silentwings »

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.

Image
Attachments
dbg_widgetprofiler.lua
(11.8 KiB) Downloaded 42 times
screen00382.jpg
(1.29 MiB) Downloaded 4 times
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Widget Profiler with moar GUI

Post by Jools »

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.
I tried to look but could not immediately find the formula. Is the formula subjective with regard to the colour formatting or time calculation?

+ award for British spelling of colour
hokomoko
Spring Developer
Posts: 593
Joined: 02 Jun 2014, 00:46

Re: Widget Profiler with moar GUI

Post by hokomoko »

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")
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Widget Profiler with moar GUI

Post by Jools »

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.
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: Widget Profiler with moar GUI

Post by Silentwings »

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 :)
User avatar
jamerlan
Balanced Annihilation Developer
Posts: 683
Joined: 20 Oct 2009, 13:04

Re: Widget Profiler with moar GUI

Post by jamerlan »

I think version with bars was better. These % are hard to read and understand. That is why analogue clocks better then digital ones.
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: Widget Profiler with moar GUI

Post by Silentwings »

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.
raaar
Metal Factions Developer
Posts: 1095
Joined: 20 Feb 2010, 12:17

Re: Widget Profiler with moar GUI

Post by raaar »

I've started using this widget profiler and it's been very useful, thanks!
Post Reply

Return to “Game Development”