开发者

How to get CPU and memory usage statistics in WIndows Phone 7?

开发者 https://www.devze.com 2023-01-19 17:59 出处:网络
开发者_Go百科How can I get CPU and memory usage statistics in Windows Phone 7? Well any statistics about particular WP7 device would be helpful.You can get memory information IN CODE from the Device
开发者_Go百科

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

Well any statistics about particular WP7 device would be helpful.


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消