IPerformanceCounterDataCollector interface

Specifies the performance counters to query and the log file to which the counter data is written.

To create this data collector, call the IDataCollectorCollection::CreateDataCollector or IDataCollectorCollection::CreateDataCollectorFromXml method. For details on the XML that you pass to CreateDataCollectorFromXml, see Remarks.

Methods

The IPerformanceCounterDataCollector interface has these methods.

Method Description
IPerformanceCounterDataCollector::get_DataSourceName Retrieves or sets the data source name if the log file is an SQL log file.
IPerformanceCounterDataCollector::get_LogFileFormat Retrieves or sets the format of the log file.
IPerformanceCounterDataCollector::get_PerformanceCounters Retrieves or sets the performance counters to query.
IPerformanceCounterDataCollector::get_SampleInterval Retrieves or sets the interval to wait between sampling counter data.
IPerformanceCounterDataCollector::get_SegmentMaxRecords Retrieves or sets the maximum number of samples to log.
IPerformanceCounterDataCollector::put_DataSourceName Retrieves or sets the data source name if the log file is an SQL log file.
IPerformanceCounterDataCollector::put_LogFileFormat Retrieves or sets the format of the log file.
IPerformanceCounterDataCollector::put_PerformanceCounters Retrieves or sets the performance counters to query.
IPerformanceCounterDataCollector::put_SampleInterval Retrieves or sets the interval to wait between sampling counter data.
IPerformanceCounterDataCollector::put_SegmentMaxRecords Retrieves or sets the maximum number of samples to log.

Remarks

The following example shows the XML that you can use to initialize this object if you call CreateDataCollectorFromXml to create it. The IDataCollector::Xml property also returns this XML.

XML
<PerformanceCounterDataCollector>
    <DataSourceName/>
    <Counter/>             <!-- Specify this element for each counter -->
    <CounterDisplayName/>  <!-- Read-only. Contains the contents of -->
                           <!-- <PerformanceCounter/> in the user's locale -->
    <LogFileFormat/>
    <SampleInterval/>
    <SegmentMaxRecords/>
</PerformanceCounterDataCollector>
Note that the example does not show the property elements inherited from IDataCollector that you also need to specify.

When you specify the XML to create the collector, you can specify only the elements for the properties that you want to set. If you do not specify a property, PLA provides a default value. When you retrieve the XML for the collector, the XML provides all elements, including those from IDataCollector.

Requirements

   
Windows version Windows Vista [desktop apps only] Windows Server 2008 [desktop apps only]
Target Platform Windows
Header pla.h

See Also

IAlertDataCollector

IDataCollector