views:

51

answers:

2

Hi!

How can I get CPU and memory usage statistics in Windows Phone 7?

Well any statistics about particular WP7 device would be helpful.

+1  A: 

Hi,

You can enable counters by using:

Application.Current.Host.Settings.EnableFrameRateCounter = true;
Microsoft.Phone.Shell.SystemTray.IsVisible = false;

There is a good article on how to read the date by Jeff Wilcox.

There is also a profiler out for Windows Phone 7. It's free if you're using one DLL. You can download it here.

keyboardP
+2  A: 

You can get memory information IN CODE from the Device Extended Properties.
Values of interest are:

DeviceExtendedProperties.GetValue("DeviceTotalMemory");
DeviceExtendedProperties.GetValue("ApplicationCurrentMemoryUsage");
DeviceExtendedProperties.GetValue("ApplicationPeakMemoryUsage");

All of these as longs.

Unfortunately, information about the CPU is not currently available.

Matt Lacey