As mentioned elsewhere, I’m currently working on a profiler to give some detailed insight into Cantabile’s audio engine performance. I thought I’d start a thread here to describe what it is, some technical details on how it works and progress updates.
In case you’re not sure what I mean by “profiler” then see here, but basically it’s a tool to give detailed break down of where time is being spent in the audio engine.
The main ideas are:
- Provide a history of performance metrics (eg: load over the previous 5 minutes, with ability to go back and see what happened if something glitches)
- Ability to get more fine grained detail on performance load - ie: per-plugin load times
- Provide even more detailed views for diagnostic purposes - eg: break down of each step Cantabile performs
- To also capture other performance metrics like page fault counts, cpu utilization, memory usage (again over time)
- Ability to export profiler data (so you can send it to me for analysis)
- Perhaps also include in the history load commentary events like “switch to song xyz”, “changed song state Verse 2”, etc…
The hardest part of all this is capturing all this information with adversely affecting performance - because that would defeat the purpose.
So far, I’ve built:
- a framework into the audio engine that lets me mark certain parts of the code and the time taken to execute it will be captured into a stream of time stamped events.
- an audio engine worker thread that collects all those events into a buffer and makes them available to the Cantabile front end
- front end code that reads this event stream and builds a heirarchical breakdown of everything logged.
Still to go:
- GUI front end
- Capturing other metrics
- Anything else mentioned above.