CsvProfiler with launch parameter "csvAllCategoriesDisabled"

Hello,

I was trying to use the CsvProfiler with all categories disabled at start then enable specific ones with a config file or the command line parameter “csvCategories=”.

I found the command line parameter “csvAllCategoriesDisabled” that was supposed to do exactly what I needed, since it changes the value of “GAllCategoriesStartDisabled”.

But it doesn’t work with “csvCategories=” because “GCsvCategoriesEnabled” is Memzeroed after all the command line parameters are handled in the “Init” function.

While the config file is correctly read after the Memzero, there is an early return in the “UpdateCategoryFromConfig” function if “GAllCategoriesStartDisabled” is set to true. This effectively prevents any category in “CategoriesEnabledInConfig” from being enabled.

I am curious if this was intended.

Thank you very much.

Steps to Reproduce

Hi,

Unfortunately, the behavior you’re seeing is intended.

This switch was added as a debugging tool to disable everything, hence it also skips the later config override.

Here’s the relevant line from the commit: “Add -csvAllCategoriesDisabled and -csvTestCategoryOnly disable all categories and enable just the CsvTest category respectively. These even disable the global category. This is useful for debugging”.

You can also view the change here on Github.

Kind Regards,

Sebastian

I’ve submitted a change which should help with this. CL 46412919 in //UE5/Main

For context, the -csvAllCategoriesDisabled commandline option was intended for performance testing the CSV profiler itself. But it’s reasonable that specifying specific -csvCategories should work. That is fixed with my change.

If you want to set specific categories via an ini file, you can do that in DefaultEngine.ini like this:

[CsvProfiler]

+EnabledCategories=Audio

+EnabledCategories=Audio_Metasound

+DisabledCategories=Chaos

Wildcards are also possible there, although +DisabledCategories=* doesn’t work as you might expect, since enabling is applied before disabling in UpdateCategoryFromConfig. I’ve fixed that in the change mentioned too.

Note though that +DisabledCategories=* will also disable the GLOBAL and EXCLUSIVE categories, so you’ll need to enable these if you need them.

Hello,

Would there be a recommended way to start with all categories disabled and enable specific ones with a config file (like DefaultEngine.ini) ?

Regards.

Hello,

This change looks like exactly what I was looking for.

Thank you very much.