The following is a summary of some of the performance measurement tools available from Microsoft for Windows Phone applications.
These tests are part of the Windows Phone 7.1 SDK. To launch the tools, right click on your project in Visual Studio and select ‘Open Marketplace Test Kit’.
Test Name
Test Description
Launch time
Validation of application launch time.
Peak memory consumption
Validation of application peak memory consumption
Application closure
Validation of all exceptions being handled and application not closing unexpectedly.
Use of Back Button
Validation of proper behavior when pressing the Back button.
To enable:
Application.Current.Host.Settings.EnableFrameRateCounter = true; Microsoft.Phone.Shell.SystemTray.IsVisible = false; // System Tray not visible
Application.Current.Host.Settings.EnableFrameRateCounter = true;
Microsoft.Phone.Shell.SystemTray.IsVisible = false; // System Tray not visible
Render Thread FPS: The number of frames per second that the independent simple animations and rendering thread is using. Keeping around 60 will provide a great experience, while a number of 30 fps will begin to show a poor experience to the end user.
Under 30 fps this counter will turn red in post-beta builds.
User Interface Thread FPS: The number of fps that the primary user interface thread is experiencing. Property change notifications, data binding, primary managed code execution, and animations not handled on the render thread use this threads’ resources.
Turns red when the count is at or below 15 fps.
Texture Memory Usage: A specialized memory counter indicating the video memory used for storing application textures.
Surface Counter: A count of the number of surfaces that are passed to the graphics chip.
Intermediate Texture Count: The number of intermediate textures created for compositing.
Screen Fill Rate: A metric representing the number of complete phone screens being painted each and every frame.
long applicationCurrentMemoryUsage = (long)Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("ApplicationCurrentMemoryUsage"); long applicationPeakMemoryUsage = (long)Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("ApplicationPeakMemoryUsage");
long applicationCurrentMemoryUsage =
(long)Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("ApplicationCurrentMemoryUsage");
long applicationPeakMemoryUsage =
(long)Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("ApplicationPeakMemoryUsage");
Mike
Page rendered at Thursday, February 23, 2012 2:52:20 AM UTC
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way. All sample code is provided AS IS without warranty of any kind.