Windows 8 和 Windows Server 2012 中的增强安全功能需要在 Visual Studio 探查器收集这些平台上的数据的方式上的重大更改。Windows 应用商店应用程序还需要新的集合技术。本主题描述了在 Windows 8 和 Windows Server 2012 平台中分析的变化。
| .gif) 说明 | 
|---|
| 分析在其他所支持的 Windows (Windows 7,Windows Server 2008 R2) 版本中的应用程序未更改。 | 
主题内容
从 Visual Studio IDE 中分析 Windows 应用商店应用程序
从 Visual Studio IDE 中分析在 Windows 8 桌面上或 Windows Server 2012 上运行的应用程序
- 使用 Visual Studio IDE 中的采样分析在 Windows 8 桌面上或 Windows Server 2012 上运行的应用程序
通过命令行进行分析
收集层交互 (TIP) 数据
从 Visual Studio IDE 中分析 Windows 应用商店应用程序
当您分析使用 JavaScript 和 HTML 5 编写的 Windows 应用商店应用时,可以对 JavaScript 代码收集检测数据。当分析使用 Visual C++、Visual C# 或 Visual Basic 编写的 Windows 应用商店应用程序或组件时,可以为本机和托管的代码收集采样数据。可以在本地或远程计算机上分析您的应用程序。
当分析 Windows 应用程序商店应用时,这些分析功能和选项是不支持的:
- 使用采样方法分析 JavaScript 应用程序。 
- 使用检测方法分析托管代码和本机代码。 
- 并发分析 
- .NET 内存分析 
- 层交互分析 (TIP) 
- 采样选项,如设置采样事件和时间间隔或收集附加的性能计数器数据。 
- 检测选项,如收集性能和窗口计数器数据或指定额外的命令行选项。 
有关分析 Windows 应用商店应用的详细信息,在 Windows Dev 中心参见以下主题:
在远程计算机上从 Visual Studio 运行 Windows 应用商店应用
使用 Visual Studio 诊断工具来分析 Windows 应用商店应用程序的性能
- 分析本地计算机上的 Windows 应用商店应用中的 Visual C++、Visual C# 和 Visual Basic 代码 
- 分析远程设备上的 Windows 应用商店应用中的 Visual C++、Visual C# 和 Visual Basic 代码 
- 分析 Windows 应用商店应用程序中的 Visual C++、Visual C# 和 Visual Basic 代码的性能数据 
主题内容
从 Visual Studio IDE 中分析在 Windows 8 桌面上或 Windows Server 2012 上运行的应用程序
对 Windows 8 使用为更改的检测方法进行分析。
层交互分析 (TIP) 不支持采样方法。
使用 Visual Studio IDE 中的采样分析在 Windows 8 桌面上或 Windows Server 2012 上运行的应用程序
当使用采样方法分析 Windows 8 桌面应用程序或 Windows Server 2012 应用程序时, 这些分析功能和选项是不支持的:
- 层交互分析 (TIP)支持使用仪表收集 TIP 数据。 
- 采样选项如设置采样事件和时间间隔或收集附加的性能计数器数据。 
通过命令行进行分析
使用两个命令行工具收集有关 Windows 8 和 Windows Server 2012 计算机上的分析数据,包括没有安装 Visual Studio 的计算机:
| 工具名称 | 描述 | 
|---|---|
| 从 Windows 应用应用商店收集分析数据同时从 Windows 8 桌面应用程序和 Windows Server 2012 应用程序收集采样分析数据.. | |
| 收集在 theWindows 8 桌面或 Windows Server 2012 上运行的应用的检测、并发和层交互分析数据。从 windows 的早期版本收集分析数据的类型。 | 
两个工具与 Visual Studio 一同安装到本地计算机上。
若要分析在未安装 Visual Studio 的计算机上的应用程序,请执行下列操作之一:
- 从 MSDN 网站 下载作为 Visual Studio 远程工具的部件的工具. 
- 从您的 Visual Studio 计算机复制并运行独立探查器工具安装程序。安装程序在 %VSInstallDir% \Team Tools\Performance Tools\Setups 文件目录下.远程计算机的操作系统 (x86/x64)选择安装程序。 
| .gif) 说明 | 
|---|
| 若要收集 TIP 分析数据,您必须在远程计算机中安有 Visual Studio 的计算机上安装独立探查器。 | 
当使用命令行分析 Windows 8 和 Windows Server 2012 应用程序时, 这些分析功能和选项是不支持的:
- 从 Windows 8 and Windows Server 2012 web 应用程序中,使用 VSPerfASPNetCmd 采样模型收集数据. 
- 使用 VsPerfCmd.exe 收集采样数据。 
- 采样选项如设置采样事件和时间间隔或收集附加的性能计数器数据。 
收集层交互 (TIP) 数据
层交互分析提供通过 ADO.NET 服务与数据库通信的多层应用程序中函数的执行时间的其他信息。收集的数据仅用于同步函数调用。
Visual Studio 版本
可以使用 Visual Studio 旗舰版, Visual Studio 高级专业版, or Visual Studio Professional 收集层交互分析数据.然而层交互分析数据只能在 Visual Studio 旗舰版 和 Visual Studio 高级专业版 中查看。
Windows 8 和 Windows Server 2012
- 若要从 Windows 8 桌面或 Windows Server 2012 上正在运行的应用程序中收集层交互数据,必须使用检测方法。 
- 不能为 Windows 应用商店应用收集层交互数据。 
- 您可以在其它支持的 Windows 版本中对所有的分析方法包含层交互数据。 
性能向导和性能资源管理器
您必须从性能资源管理器为运行的分析添加层交互数据收集选项。还必须为性能资源管理器目标节点添加项目,可执行文件或网站。请参见 通过使用 Visual Studio IDE 收集层交互数据。
收集有关远程计算机的 TIP 数据
若要从远程计算机上收集层交互数据,您必须从远程一个安装有 Visual Studio 的计算机上的 %VSInstallDir%\Team Tools\Performance Tools\Setups 文件夹下复制 vs_profiler_<Platform>_<Language>.exe 文件并安装它.您不能从 Visual Studio 远程工具 下载页面使用分析工具.
您可以使用 VSPerfCmd 或 VSPerfASPNetCmd 来收集分析数据.
(TIP) 报表
层交互数据只能在 Visual Studio 旗舰版 或 Visual Studio 高级专业版 IDE 中查看。通过 VSPerfReport 得到的基于文件的层交互报告不可用。