如何在WIndows Phone 7中获取CPU和内存使用情况统计信息?

时间:2010-10-13 19:55:33

标签: windows-phone-7

如何在Windows Phone 7中获取CPU和内存使用情况统计信息?

有关特定WP7设备的任何统计信息都会有所帮助。

2 个答案:

答案 0 :(得分:5)

您可以从Device Extended Properties获取内存信息IN CODE 感兴趣的值是:

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

所有这些都是长期的。

不幸的是,目前还没有关于CPU的信息。

答案 1 :(得分:2)

您可以使用以下方式启用计数器:

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

有一篇关于如何按Jeff Wilcox阅读日期的文章。

Windows Phone 7还有一个分析器。如果你使用的是一个DLL,它是免费的。你可以download it here