Jump to content

Profiling your Mod


Recommended Posts

  • Developer

Don't Starve comes equipped with a cpu frame profiler to help you track down performance problems with your mod.  The profiler makes use of the Chrome Tracing Visualizer to let you see where all your precious cpu time is being spent.


To run the profiler you will need:

- Google Chrome

- Debug Keys Enabled


Step 1: Launching the Profiler


To launch the profiler, press the 'backspace' button in game up the profiling hud.  Now press 'ALT+/' to start recording and then again to stop.  Your profile will be saved to 'dont_starve/data/profile.json'.


Step 2: Launching Chrome Tracing



The Chrome Tracing Visiualizer can be launched by starting Chrome and browsing to 'chrome: //tracing/'


Step 3: Loading your Profile


Click load and open 'dont_starve/data/profile.json'.


Step 4: Visualizing your Profile


You should now see a breakdown of all the frames you recorded.  You can use 'CTRL+LMB' and 'ALT+LMB' to pan and zoom.  If you want your profiles to have finer detail, you can add markers by wrapping your code with:

TheSim:ProfilerPush('marker_name')--Put slow code here :)TheSim:ProfilerPop()

And that's it!  Hopefully this will help you track down performance problems with your mod.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

  • Create New...