"Neil Moss" <neil.moss@sp.am.unitech.net> writes:
[quoted text, click to view] > Hi group,
>
> I cannot get my performance counter instances to appear in perfmon.
You need to get them created in the registry. I use this code for
mine:
static void Main () {
// Delete existing counters
if (PerformanceCounterCategory.Exists("Scheme"))
PerformanceCounterCategory.Delete("Scheme");
CounterCreationDataCollection CCDC = new CounterCreationDataCollection();
CCDC.Add (new CounterCreationData ("Apply Setup",
"Calls to applySetup per second",
PerformanceCounterType.RateOfCountsPerSecond32));
CCDC.Add (new CounterCreationData ("Trampoline Bounces",
"Trampoline bounces per second",
PerformanceCounterType.RateOfCountsPerSecond32));
CCDC.Add (new CounterCreationData ("Stack Reloads",
"Stack Reloads per second",
PerformanceCounterType.RateOfCountsPerSecond32));
PerformanceCounterCategory.Create ("Scheme", "Runtime", CCDC);
Console.WriteLine("Created Scheme performance counters.");
}
You need to run this just once.
[quoted text, click to view] > Can someone at MS provide a definitive mechanism for how to do this please?
>
> I am writing a web service which may be installed multiple times on the same
> server under different web sites. Thus I want instance information.
The code above doesn't do instance information. I've been too lazy to