Applies to: desktop apps only
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.
Members
The IPerformanceCounterDataCollector interface inherits from IDataCollector. IPerformanceCounterDataCollector also has these types of members:
Properties
The IPerformanceCounterDataCollector interface has these properties.
| Property | Description |
|
DataSourceName
|
Retrieves or sets the data source name if the log file is an SQL log file.
|
|
LogFileFormat
|
Retrieves or sets the format of the log file.
|
|
PerformanceCounters
|
Retrieves or sets the performance counters to query.
|
|
SampleInterval
|
Retrieves or sets the interval to wait between sampling counter data.
|
|
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.
<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
|
Minimum supported client
| Windows Vista |
|
Minimum supported server
| Windows Server 2008 |
|
Header
|
- Pla.h
|
|
DLL
|
- Pla.dll
|
See also
-
IAlertDataCollector
Send comments about this topic to Microsoft
Build date: 2/3/2012