Profiling Windows Store (Windows RT) apps
Published 11 June 2013
Profiling can be particularly important for Windows Store apps because Windows 8 is heavily optimized for a responsive UI experience (especially for touch interfaces) and to preserve battery life on mobile devices. So, for example, Windows 8 may suspend and terminate processes to maintain performance, Windows RT applications may be more likely to use Async functionality, and background tasks have limited CPU usage quotas.
Profiling Windows Store apps has a similar setup process to .NET executables, but is only available on Windows 8 or Windows Server 2012, and only with the Method-level Timings profiling mode. You choose the app to profile, and the performance counters you're interested in, then click start.
This article steps through the process and explains the details you should be aware of.
To profile a Windows Store app:
- From the list of application types, click Windows Store app.
- From the Select Windows Store Application dropdown, choose the app you want to profile.
The dropdown is automatically populated with the available Windows Store apps. - Select the Chart performance counters you are interested in.
Note that for Windows Store apps, the only available Profiling Mode is Method-level Timings - All methods, inc framework
Other limitations of Windows Store apps are discussed later in this article.
For more information, see Choosing application types and settings and Setting up chart performance counters. - Click
The Windows Store app starts, profiling begins, and your performance counters start to show on the timeline.
During a profiling session you can interact normally with your application and with the profiler.
When you have finished interacting with your application, click the button in ANTS Performance Profiler to stop profiling.
Tips and troubleshooting
There are some limitations when profiling Windows Store apps:
- You cannot profile Windows Store apps while running ANTS Performance Profiler as an administrator.
- The only available profiling mode is Method-level Timings - All methods, inc framework;
- HTTP requests, SQL calls, and line-level timing information are not collected.
- You cannot profile File I/O.
This is because the Windows Store app sandbox does not allow the collection of I/O data. - Method events are not displayed in the timeline with WinRT apps.
- When profiling Windows Store Applications, ANTS Performance Profiler does not display results for trivial methods.
A method is considered trivial if it is smaller than 192 bytes of IL, doesn't contain any branches or loops, and doesn't contain any calls to other methods. Note that this is not the same as an Insignificant Method. A significant method that is also trivial will not be shown in the profiling results. - You cannot attach the profiler to WinRT apps that run as .NET 4 processes.
- You need a valid Windows Developer license installed on your computer to profile Windows Store apps.
You cannot currently save profiling results from Windows Store apps.