My first idea would be to measure the total frame time and then different times before and after certain tasks inside frame generation.
Are you asking a question or having a general discussion?
Changed the title, better now?
It was not the title that threw me off the scent…
Hmm, I’m a bit lost now. So to answer your question, a general approach in finding bottlenecks it would be then.
I was confused as to what exactly it was you are erm asking or looking to achieve… I do not mean to misdirect your thread just I and possibly some others are confused by your thread title and your first message…
The title indicated a question
The message indicated a discussion of a topic
Hence why I was thrown off the scent…
There is a MonoGame debugging utility called GEARSET you can use to perform real-time profiling of your application.
https://www.nuget.org/packages?q=gearset
Specifically, see the Profile Gear and the BeginMark and EndMark methods
Code available on GitHub if you need to fix anything
Disclaimer - I worked on this project.
Oh ok. I just wanted to know which methods you guys use for this task or how you do it. I never needed it so far, but my deferred renderer is too slow now and I want to figure out at which parts improvement would make sense the most.
There is a topic on it right here:
Like a few down from the top of the latest posts board…
My head hurts reading this thread, I will no longer reply to this thread, sorry. but good luck.
Thanks, I will have a look at it.
I’ve just been using the profiling tools in Visual Studio - they seem to work pretty well. Enabled me to make some massive optimisitions in my code anyway!
Nice, is there a good tutorial for using the Visual Studio profiling tools?
I recommend taking advantage of the great C# tools out there on PC. There are tons of different C# profilers out there which will tell you quickly what function is called the most in your code, which functions consume the most runtime, and even which lines of code are the bottleneck in your code base.
The JetBrains set of tools are nice including both memory and performance profilers:
https://www.jetbrains.com/profiler
You have the ANTS profilers:
http://www.red-gate.com/products/dotnet-development/ants-performance-profiler
Also found this new one recently called NProfiler which looks really interesting.
All these tools have trails which can give you time to use them fully and possibly find one you like the best.
having used 2 out of 3 tools Tom listed - I still use the default Visual Studio “Performance and Diagnostics” tools the most. Start with that if you didn’t use them before.
For GPU / Frame debugging I prefer Intel GPA over the standard VS frame analysis and RenderDoc, but this is a matter of preference.