Section
Introduction
The Section class can be used to measure and report performance in FlatRedBall. It has the following features/benefits:
Supports a tree structure so that sections can be sub-divided.
Supports a context system so different sections of code can create sections without requiring managing and passing around references
Can be serialized to a compact XML file.
Code Example
The following shows the simplest way to time a section and print the result. Add the following using statement:
If you add this code to an Update or Activity function it will be called every frame, so you will want to add it to your game's Initialize or a Screen's CustomInitialize:
For more information on CommandLineWrite, see the CommandLineWrite page.
Last updated
Was this helpful?