Using the stats "budget" command

It seems that the engine has support for a “budget” command to load a custom stat group along with associated budgets from a named section of the engine .ini file.

There doesn’t seem to be any documentation on the “budget” command that I could find, however I was able to deduce some of the functionality by reading the code.

I created a section called “MyStats” in the engine .ini file that looks like this:

+Stats=Tick Time
+Stats=Update Components Time
+Stats=World Tick Time

After fixing a minor bug (GStatProcessingViewportClient was null, so the “budget” command was not processed correctly) I’m able to issue this command:

budget MyStats

This does seem to load the custom stat group along with the budgets per stat, but the display doesn’t seem functional. In the “MyStats” group all of the numbers are zero.

Does anyone have experience with using budgets for the real-time in-game stats?


I was setting this up for our project. You need to use the actual in code stat name, so for example:

The budget aspect of it didn’t seem to work for me, and I didn’t bother debugging further. From what I could see the budgets only work for timers, where I’d really like it to work for anything (ex, have a budget for number of draw calls, and change the color red when we go over budget). A more fully fleshed out budget system like this would be very helpful, I’ve seen it used successfully on other projects.

Another bug I noticed, is that some stats won’t show up in the budget, until you call the main stat command that displays that stat. For example: STAT_UnitGame or STAT_UnitRender.