On MacOS the best thing you can do is integrate Perfetto and use it. This has shown me so many interesting details about things. I guess that’s what you might’ve meant with signposting, since this is also quite easy to do with Perfetto calls in the right places…
Signposting is the same, it just uses Instruments instead.
But that’s not what I’m talking about here. There’s a ton of profiling built in to the Direct2D juce code (on Windows only), I just want to know how to access it.
Perfetto can’t open the log files created by ETW. Maybe there’s a conversion tool?
This needs more TLC, but this should at least work with JUCE develop.
Build your binary with #define JUCE_DIRECT2D_METRICS=1.The renderer will create a named pipe server to report metrics. Here’s a prebuilt app that reads and displays the metrics:
Click the dropdown at the top of the window to select the window you want to observe. The app shows statistics for all the various drawing operations the renderer can perform; typically I look for excessive standard deviation.
Times are shown in milliseconds.
The “%” column shows the relative amount of time spent on each operation in a single frame. For example, in the screenshot above, the renderer is spending about 56% of each frame calling EndDraw on average.