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]
Comments
- Anonymous
April 23, 2004
The comment has been removed - Anonymous
April 26, 2004
This saved my bacon at the MDC in Malaysia. I was putting together a game demo. It seemed like the right thing to do as I was giving a talk on game development in .NET CF and I'd never written a game before. With less than an hour left my game kept crashing with an out of memory exception. Ahhhh. Having talked about mscoree.stat at a talk in Australia I switched it on and - BINGO - realized I was allocating BIG objects in my screen update function. Doh! The device was running out of memory real fast. - Anonymous
June 09, 2008
Just want to let you know that EQATEC has released the worlds first .NET compact framework profiler. It is free to use and can be downloaded here: http://www.eqatec.com/tools/profiler The profiler is very easy to use and it has received fine reviews. Best regards, Eigil