Accurately capturing Studio performance

Our project has a lot of telemetry tooling built in for recording performance metrics between builds so we can accurately determine the performance cost of specific features and ensure that we aren’t suffering performance wise as things are added. I’m trying to add FMOD metrics to those numbers but I’m having an issue reporting FMOD’s performance in absolute time.

According to the documentation, things like studio update or the mixer thread update are captured in a percentage of “total CPU time” but I can’t find anywhere where it documents what exactly that time is in units. I’d like to report the update time for each of the audio threads in milliseconds to match our other recorded numbers for things like GPU time, main thread time, etc. How might I go about doing this? Basically I need a way to find the denominator in the ratio that the API gives me when I poll CPU_USAGE. My first assumption is to use deltaTime, but I don’t think that’s quite accurate.

To me it doesn’t make sense to record the raw percentages because the denominator is (presumably) variable, making comparison between two different % metrics useless.

Hi,

An explanation of how we get these final values can be found here: FMOD Engine | White Papers - CPU Performance, and FMOD Studio | Profiling - Reading a Recorded Session.

A great explanation can be found here: getCPUUsage question - #2 by jeff_fmod.

If you are using the default DSP block size with playback of 48khz we expect each system::update is going to take 10ms. If we get a return value of 50% from the core cpu usage we can deduce that each update is actually only taking 5ms.

Hopefully, this will give you enough information to build accurate profiling tools. If there is anything else I can assist with, please let me know.