Tag Archives: Performance Counter

Cinchoo – Using Performance Counters, Part 4

This is the continuation of previous articles on Performance Counters. So far you learned how to create, use and control the performance counters in your application. In this article, I’ll talk about two performance counters category attributes to control the installation of ¬†Performance Counters.

There are

  • selfInstall – true to install the counters automatically when you instantiate the object, otherwise it won’t install the counters.
  • recreate – true to recreate the counters irrespective of their existence, otherwise skip recreating them if already exists.
<?xml version="1.0" encoding="utf-8"?>
  <PerformanceCounterCategory name="Random Single Instance Test" selfInstall="true" recreate="true">
    <PerformanceCounter name="Random Rate" turnOn="true" />
    <PerformanceCounter name="Random Average" turnOn="true" />
  <PerformanceCounterCategory name="Random Multiple Instance Test" selfInstall="true" recreate="true">
    <PerformanceCounter name="Random Value" instanceName="Standard" turnOn="true" />
    <PerformanceCounter name="Random Value" instanceName="Inverted" turnOn="true" />