I’m helping out on a PSM Playstation Mobile project in C# and I quickly slapped together this profiler class whilst searching for some slowness in an update loop. I put it up on github here for anyone to use if needed.

This should also work in any other C# development. nothing too fancy but it provides  some helpful statistics like Average length spent, maximum time spent in one loop, and number of times it was called. This came in especially handy for collision detections done per frame, as it ended up being done many times per update.

 

 

Share Button