Merrion
Well-known member
All,
I have created a custom performance category thus:-
How do I now send data to these performance counters?...i.e. how do I create a new PerformanceCounter object refering to these counters?
Thanks in advance,
Duncan
I have created a custom performance category thus:-
Code:
Dim CounterDataCollection As New CounterCreationDataCollection()
\\ Create the counters and set their properties.
Dim cdCounterTotal As New CounterCreationData()
Dim cdCounterEMF As New CounterCreationData()
cdCounterTotal.CounterName = "Spool files read"
cdCounterTotal.CounterHelp = "Total spool files read"
cdCounterTotal.CounterType = PerformanceCounterType.NumberOfItems64
cdCounterEMF.CounterName = "EMF Spool files read"
cdCounterEMF.CounterHelp = "Total EMF spool files read"
cdCounterEMF.CounterType = PerformanceCounterType.NumberOfItems64
\\ Add both counters to the collection.
CounterDataCollection.Add(cdCounterTotal)
CounterDataCollection.Add(cdCounterEMF)
\\ Create the category and pass the collection to it.
PerformanceCounterCategory.Create( _
"Spoolfile reader", "Printer spoolfile reading perdormance",
CounterDataCollection )
How do I now send data to these performance counters?...i.e. how do I create a new PerformanceCounter object refering to these counters?
Thanks in advance,
Duncan