Profiling

Published July 29, 2009
Advertisement
Added an internal profiler to the project today. I ended up using the Shiny Profiler (found at SourceForge) because it is lightweight, powerful and really simple to set up. It took me 30 minutes to get it to work, compiling included, and then another 30 minutes to get the results I wanted.

It uses some nice preprocessor magic to settle itself in your code so that you only need to call PROFILE_FUNC() at the beginning of each function you want to time. Beyond that you need to call an update function at the end of every frame, or loop or whatever you're measuring over. Finally you call a third function to get a formatted tree like in the pretty picture. There are more advanced options available but those three calls are all you need to get going.

I can really recommend this if you want a simple yet flexible, open-source profiler.

The download says there are no examples but it does include two very simple ones.

Previous Entry Life is good.
0 likes 1 comments

Comments

aidinabedi
I'm really glad you like my profiler! I should probably update it with the even faster one I made for Snow Hard, including output-sorted-by-time and Lua support of course ;)

/Aidin
September 04, 2009 06:30 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement