如何:使用负载测试编辑器管理计数器集How to: Manage counter sets using the Load Test Editor

使用“新建负载测试向导”创建负载测试时,需添加一个初始计数器集。 When you create a load test with the New Load Test Wizard, you add an initial set of counters. 该计数器集为您的负载测试提供了一组预定义计数器集。These offer you a set of predefined counter sets for your load test.

Note

如果负载测试分布在多台远程计算机之间,则会将控制器和代理计数器映射到控制器和代理计数器集中。If your load tests are distributed across remote machines, controller and agent counters are mapped to the controller and agent counter sets. 有关如何在负载测试中使用远程计算机的详细信息,请参阅测试控制器和测试代理For more information about how to use remote machines in your load test, see Test controllers and test agents.

管理计数器集包括选择要从中收集性能数据的计算机集,指定从各个计算机收集数据的计数器集。Managing counter sets involves choosing the set of computers you want to collect performance data from, and assigning a set of counter sets to collect from each individual computer. 在“负载测试编辑器”中管理计数器。 You manage your counters in the Load Test Editor.

管理计数器集

Note

已弃用 Web 性能和负载测试功能。Web performance and load test functionality is deprecated. Visual Studio 2019 是支持 Web 性能和负载测试的最后一个版本。Visual Studio 2019 is the last version where web performance and load testing will be available. 有关详细信息,请参阅基于云的负载测试服务生命周期结束博客文章。For more information, see the Cloud-based load testing service end of life blog post.

管理计数器集To manage counter sets

  1. 打开一个负载测试。Open a load test.

  2. 选择“管理计数器集”按钮 。Choose the Manage Counter Sets button.

    - 或 -– or –

    右击负载测试树中的“计数器集”文件夹,然后选择“管理计数器集” 。Right-click Counter Sets folder in the load test tree and choose Manage Counter Sets.

    随即显示“管理计数器集”对话框 。The Manage Counter Sets dialog box is displayed.

  3. (可选)在“选定的计算机和计数器集将添加到以下运行设置下”列表框中,选择其他运行设置 。(Optional) In the Selected computers and counter sets will be added under the following run settings list box, select a different run setting.

    Note

    这仅适用于负载测试中具有多个运行设置时。This only applies if you have more than one run setting in your load test.

  4. (可选)选择“添加计算机”以添加要监视的新的计算机 。(Optional) Choose Add Computer to add a new computer to monitor. 系统会提示您输入名称。You will be prompted for a name. 键入计算机的名称,您将在新项下面看到节点。Type the name of a computer, and you will see nodes below the new entry. 例如,“ASP.NET”、“IIS”、“SQL”等 。For example ASP.NET, IIS, SQL, and others. 选中您要选择的节点前面的复选框。Select the check boxes in front of the nodes you want to select. 新的计数器将出现在“预览选定内容”窗格中 。The new counters appear in the Preview selections pane.

  5. (可选)在“计算机标记”文本框中,键入要与计算机关联的标记 。(Optional) In the Computer Tags text box, type a tag to associate with the computer. 例如,“TestMachine12 in lab3”。For example, "TestMachine12 in lab3".

    通过计算机标记可以用很容易识别的名称来标识计算机。Computer tags let you identify a computer with an easy-to-recognize name.

    在负载测试编辑器中,这些标记会显示在树的“计数器集映射”节点中 。The tags are displayed in the Counter Set Mappings node in the tree in the Load Test Editor. 更重要的是,这些标记可显示在 Excel 报表中,从而帮助利益干系人标识计算机在负载测试中所具有的角色。More important, the tags are displayed in Excel reports, which help stakeholders identify what role the computer has in the load test. 例如,“Web Server1 in lab2”或“SQL Server2 in Phoenix office”。For example, "Web Server1 in lab2" or "SQL Server2 in Phoenix office". 有关详细信息,请参阅报告负载测试结果以比较测试或进行趋势分析For more information, see Report load tests results for test comparisons or trend analysis.

  6. 选择 “确定”Choose OK.

请参阅See also