# Profiler: CPU usage in ms?

**URL:** https://qa.fmod.com/t/profiler-cpu-usage-in-ms/21815
**Category:** FMOD Studio
**Created:** [June 28, 2024, 11:02am UTC](https://qa.fmod.com/t/profiler-cpu-usage-in-ms/21815 "2024-06-28T11:02:16Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![DracoNared](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/draconared/32/1875_2.png) [@DracoNared](https://qa.fmod.com/u/DracoNared)
#### Post date: [June 28, 2024, 11:02am UTC](https://qa.fmod.com/t/profiler-cpu-usage-in-ms/21815/1 "2024-06-28T11:02:16Z")

</div>

Hi,

I wanted to know if there is an option to turn on CPU usage in miliseconds? I think that current implementation of percentage is really hard to read. Even the official info in the documentation is not very helpful:

> “The percentage represents how long it takes, in relation to the amount of time it has to complete a mix. For example, on XBox One where a mix block is 10ms (512 samples), 50% usage represents the mixer thread taking 5ms to complete.”  
> Source: [https://fmod.com/docs/2.02/studio/profiling.html#reading-a-recorded-session](https://fmod.com/docs/2.02/studio/profiling.html#reading-a-recorded-session)

Without knowledge how long it takes to complete a mix on any platform, percentage is useless. Miliseconds are more useful especially because when optimizing operations in video games, it is important to see how an operation takes time in miliseconds and how long it takes after we improved it.

If it’s not possible to turn it on, I would like to request a feature: show CPU usage in ms.

---

<div class="post-metadata">

### Author: ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)
#### Post date: [July 1, 2024, 2:10am UTC](https://qa.fmod.com/t/profiler-cpu-usage-in-ms/21815/2 "2024-07-01T02:10:23Z")

</div>

Hi,

We are always looking to improve our documentation, are there any specific improvements we could make to this topic?

> [@DracoNared](#):
>
> Without knowledge how long it takes to complete a mix on any platform

It is possible to calculate the expected completion time, further explained here: [FMOD Engine | Core API Reference - System::getDSPBufferSize](https://fmod.com/docs/2.02/api/core-api-system.html#system_getdspbuffersize).  
Summary:

- For a `bufferlength` of `1024` and an output rate of `48khz` (see [System::SetSoftwareFormat](https://fmod.com/docs/2.02/api/core-api-system.html#system_setsoftwareformat)), mix time in milliseconds = 1024 / 48000 \* 1000 = 21.33ms. This means the mixer updates every 21.33ms.

Hopefully with the expected time the returned percentage will be more useful.

> [@DracoNared](#):
>
> If it’s not possible to turn it on, I would like to request a feature: show CPU usage in ms.

However, I can still pass on your feature request if you feel that would be more useful?

---

<div class="post-metadata">

### Author: ![DracoNared](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/draconared/32/1875_2.png) [@DracoNared](https://qa.fmod.com/u/DracoNared)
#### Post date: [July 1, 2024, 8:12am UTC](https://qa.fmod.com/t/profiler-cpu-usage-in-ms/21815/3 "2024-07-01T08:12:02Z")

</div>

Thanks for the reply!

I’m going to reply to what you wrote out of order:

> [@Connor\_FMOD](#):
>
> It is possible to calculate the expected completion time, further explained here: [FMOD Engine | Core API Reference - System::getDSPBufferSize](https://fmod.com/docs/2.02/api/core-api-system.html#system_getdspbuffersize).

It is something, haven’t thought about it, however it still wouldn’t be available in FMOD Studio’s profiler window, what is my main point of interest when checking the performance. The pros of this approach is that all other team members on the project can see how much miliseconds FMOD operations take, but I mostly check the performance in FMOD Studio’s profiler window. For now I will use that.

> [@Connor\_FMOD](#):
>
> We are always looking to improve our documentation, are there any specific improvements we could make to this topic?

With what you wrote about this expected completion time, until you made an update in FMOD to include miliseconds in the profiler window, I think it might be good to make a small note that if somebody is looking for miliseconds for Mix or Update, they can get it from Core API, and a link to that place.

> [@Connor\_FMOD](#):
>
> However, I can still pass on your feature request if you feel that would be more useful?

Yeah, I would like this feature and I hope that others might benefit from that, too. Being able to see in FMOD Studio how much miliseconds the FMOD takes will be very useful, because it would be easier to compare the performance to the rest of the project. And, from what you said, it doesn’t look like a big addition to FMOD Studio.

Anyway, looking forward to adding it to FMOD Studio.

PS:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/b/bccd079058a2d23fe55becad01866907fc442b59.png)  
I think you missed a multiplication symbol in the getDSPBufferSize. 😉

---

<div class="post-metadata">

### Author: ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)
#### Post date: [July 2, 2024, 2:16am UTC](https://qa.fmod.com/t/profiler-cpu-usage-in-ms/21815/4 "2024-07-02T02:16:12Z")

</div>

> [@DracoNared](#):
>
> FMOD Studio’s profiler window, what is my main point of interest when checking the performance.

Apologies, I missed we were talking about the profiler and not the Core API.

> [@DracoNared](#):
>
> I think it might be good to make a small note that if somebody is looking for miliseconds for Mix or Update, they can get it from Core API, and a link to that place.

Thank you, I will make a note to add that.

> [@DracoNared](#):
>
> Yeah, I would like this feature and I hope that others might benefit from that, too. Being able to see in FMOD Studio how much miliseconds the FMOD takes will be very useful, because it would be easier to compare the performance to the rest of the project. And, from what you said, it doesn’t look like a big addition to FMOD Studio.

I will pass on your suggestion to our development team to investigate further.

> [@DracoNared](#):
>
> I think you missed a multiplication symbol in the getDSPBufferSize.

Thank you for catching that. I will make a task to fix that.
