title: How to update a performance counter to a remote pc?
body: <p>I have created some <code>Load Tests</code>. All my load tests are consist of one unit test.
   I have also created a <code>LoadTest Plug-in</code> 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 <a href="https://stackoverflow.com/questions/8990448/vs-2010-load-tests-results-with-custom-counters">here</a>) with the following code.</p>
  
  <p><strong>PlugIn code:</strong></p>
  
  <pre><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);
  }
  </code></pre>
  
  <p><strong>UnitTest code:</strong></p>
  
  <pre><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);
      }
  }
  </code></pre>
  
  <p>Since the plugin is running in the <code>Test Controller</code> the custom counter category is created in the pc where the controller is running. Now I am running my Load Tests in a <code>Test Rig</code> using many <code>Test Agents</code>. 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. </p>
  
  <p>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?  </p>