Updated profiling layout for BGE
Closed, ResolvedPublic

Description

This patch is a proposal for a cleaner profile layout.

In the existing Blender trunk, the profile information is stuck in one small block.
It doesn't separate debug properties from the framerate information, meaning that it can be hard to distinguish individual elements
In addition, the debug information still uses the 2.49 attribute-style property information, using a fullstop as a delimiter.
Instead, I propose the following changes:

- Rename the Swap entry in framerate to "Frametime".
- Modify the frametime value to return the length of the frame in ms.
- Reword "frames per second" to "fps" (takes less space in the X dimension"
- Add headers to Profile information and Debug properties
- Convert debug property display to use Object : "property_name" = value

This patch should be easily extendable.
It uses a variable to determine the current draw positions
It has variables for a constant x and y displace - per sub entry, and variables for header entries:

Headers are indented -3 in the x direction
Headers have a margin of 4 above and 2 below them. These margins are added to the default margins (x=12, y=17)

At the end of each -element that is drawn, you simply increment the Y position by the constant Y size. In the case of headers, you then increment the same variable by the header_margin.
The x coordinate variable stays constant throughout, it never changes and acts as a reference indent.

The reason that I created this patch is because I feel that the BGE profiling information is rather basic. Before I made any efforts to provide perhaps a graphing solution, this proved to be both an introductory insight and a partial solution.

Details

Type
Patch

Is the screenshot up to date with the supplied patch? Looking over the patch, I'm noticing some inconsistencies (Framerate versus Frametime). Also, why are you using two RenderText2D calls for a single line? Alignment?

I use two calls because there are two properties that control the display of framerate and profile. Theoretically, you could omit the frame time.
The patch should rename framerate to "Frametime". Sorry about that.

Committed with some changes as r51777. Next time, please make the patch off of the working copy instead of an individual file.

Mitchell Stokes (moguri) closed this task as Resolved.Oct 30 2012, 11:48 PM