Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8172985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:58:22+00:00 2026-06-06T21:58:22+00:00

I have created some Load Tests . All my load tests are consist of

  • 0

I have created some Load Tests. All my load tests are consist of one unit test.
I have also created a LoadTest Plug-in and assigned it to all my load tests.
Each unit test updates some custom performance counters that I create in the LoadTest Plug-in (more details here) with the following code.

PlugIn code:

private void m_loadTest_LoadTestStarting(object sender, System.EventArgs e)
{
    CounterCreationDataCollection counters = new CounterCreationDataCollection();
    counters.Add(new CounterCreationData("CustomCoumter", "Custom Coumter description", PerformanceCounterType.AverageCount64));

    PerformanceCounterCategory.Create("CustomCounterCategory", "Custom Performance Counters", PerformanceCounterCategoryType.MultiInstance, counters);
}

UnitTest code:

[TestClass]
public class UnitTest1
{
    PerformanceCounter customCounter;

    [ClassInitialize]
    public static void ClassInitialize(TestContext TestContext)
    {
        // Create the instances of the counters for the current test
        customCounter= new PerformanceCounter("CustomCounterCategory", "CustomCoumter", "UnitTest1", false));
    }

    [TestMethod]
    public void TestMethod1()
    {
         // ... Testing
         customCounter.Incerement(time);
    }
}

Since the plugin is running in the Test Controller the custom counter category is created in the pc where the controller is running. Now I am running my Load Tests in a Test Rig using many Test Agents. When a unit test is executing in a pc other than this where the Test Controller is running the counter is not updated. I think this happens because with my code I am updating the counter in the pc where the test is running, NOT in the controller’s pc.

How can I update my custom counter in the controller’s pc? Do I have to create the counter’s instance in my unit tests with a different way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T21:58:26+00:00Added an answer on June 6, 2026 at 9:58 pm

    Performance counters are usually used to monitor performance for components that are running locally on the machine. perfmon can then be used to monitor the performance counter for that machine. From what you describe, this is exactly what is happening.

    So you would have to monitor the performance counter on the agent machines (after installing it there, of course) in order to get the data about the counter.

    I assume that this counter is in some way measuring how long the test is taking. Because, if you were measuring the system under test then the performance counter increment would be integrated into the production code that is under test.

    I’m not aware of any way to increment a performance counter on a remote machine, but this seems to be against the usual patten. However, there are ways to read remote performance counters (from the agent machines, for instance). I think this would be best in your circumstance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created an R script that it needs to load some libraries first.
I have dialog created like this $('#add_error').click(function(e) { $('<div>') .load('/someaction/format/html/') .dialog({ title: 'Some title',
I have created some tests in my WPF application. Right now I am working
I have created a database and a table. I have also created all the
I have a web service I'm trying to load test. I created a program
I have created some JQuery that will expand a div 'popup' on hover and
I have created some python code which creates an object in a loop, and
I have created some functional categories that I use to show/hide markup elements. However,
I have created some simple charts (of type FastLine) with MSChart and update them
I have created some documents and managed to make some simple queries but I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.