How to: Add counters to counter sets using the Load Test Editor

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

When you create a load test with the Load Test Wizard, you add an initial set of counters. These offer you a set of predefined counter sets for your load test. For more information, see Specify the counter sets and threshold rules for computers in a load test.

Note

Web performance and load test functionality is deprecated. Visual Studio 2019 is the last version where web performance and load testing will be fully available. For more information, see the Cloud-based load testing service end of life blog post. To reduce the impact on users some minimum support is still available in Visual Studio 2022 Preview 3 or later. Users should also note web performance and load test functionality only supports Internet Explorer which is not available on Windows 11 and some versions of Windows 10. Read more on Internet Explorer Lifecycle policy.

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.

You manage your counters in the Load Test Editor. The counter sets that are already added to the test are visible in the Counter Sets node of the load test. After you create a load test, you can add new counters to existing counter sets.

To add counters to a counter set

  1. Open a load test.

  2. Expand the Counter Sets node. All the counter sets that have been added to the load test are visible.

    Note

    The load test hierarchy tree also contains the Run Settings node. This node contains the Counter Set Mappings node, which shows all the computers and the counter sets that are mapped to those computers.

  3. Right-click an existing counter set and then choose Add Counters.

    The Pick Performance Counters dialog box is displayed.

  4. In the Computer drop-down combo box, type the name of the computer you want to map to. Alternatively, select one of the computers in the drop-down list.

    Note

    Because counter sets must be mapped to a computer before performance data is collected, you must specify a computer on which to collect performance data.

  5. Select a Performance category to filter the categories of performance data counters. You will see two columns of data from which to select performance counters.

    Note

    Some counter categories will require that you select an instance also. For example, if you select a SQL counter, you must select a SQL instance because there may be more than one instance of SQL installed on the target computer.

  6. Select a counter and an instance to add to your custom counter set.

    - or -

    Select the All counters radio button to select all available counters.

  7. Choose OK.

    Note

    It is also possible to add counters to a counter set by choosing an existing counter or counter category, choosing copy, and then pasting it to a different counter set node. Extra counters that are copied, but not needed, can be deleted.

See also