PerformanceCounter::printStatistics() to use Logger::writeToLog

I use PerformanceCounters quite a bit in release builds and on remote CI servers to track performance over time and general differences between OSes/machines etc.

However, PerformanceCounter::printStatistics which is called automatically from stop() uses Loggerr:outputDebugString, this is fine on macOS and Linux but on Windows this uses OutputDebugString which isn’t printed in release builds.

To bring the behaviour in line with the other OSes and make it generally more compatible with juce::UnitTest, could it be changed to use Logger::writeToLog?

I don’t think that would make much difference to most users as they’re probably expecting this info to appear on the console anyway (as it will be in other OSes).


1 Like