Testing .NET CF Performance
So you've got your .NET CF app up and running. Now you want to focus on reworking the code to optimize performance. The obvious approach is to put timers in your code to see how long specific operations take to complete. But what you may not be aware of is the ability to get .NET CF to spit out these performance-related statistics on its execution:
- Execution Engine Startup Time
- Total Program Run Time
- Peak Bytes Allocated
- Number Of Objects Allocated
- Bytes Allocated
- Number Of Simple Collections
- Bytes Collected By Simple Collection
- Bytes In Use After Simple Collection
- Time In Simple Collect
- Number Of Compact Collections
- Bytes Collected By Compact Collections
- Bytes In Use After Compact Collection
- Time In Compact Collect
- Number Of Full Collections
- Bytes Collected By Full Collection
- Bytes In Use After Full Collection
- Time In Full Collection
- GC Number Of Application Induced Collections
- GC Latency Time
- Bytes Jitted
- Native Bytes Jitted
- Number of Methods Jitted
- Bytes Pitched
- Number of Methods Pitched
- Number of Exceptions
- Number of Calls
- Number of Virtual Calls
- Number Of Virtual Call Cache Hits
- Number of PInvoke Calls
- Total Bytes In Use After Collection
Enabling this feature, interpreting the values, and performance-tweaking your application are the subject of this MSDN whitepaper.
[Author: Robert Levy]