Click or drag to resize

PerformanceMonitorAddCounter Method (String, String, String, String, String, Single, Boolean, FuncSingle, Single)

Adds a PerformanceCounter to be monitored.

Namespace:  GSF.Diagnostics
Assembly:  GSF.Core (in GSF.Core.dll) Version: 2.3.436-beta
Syntax
public void AddCounter(
	string categoryName,
	string counterName,
	string instanceName,
	string aliasName,
	string valueUnit,
	float valueDivisor,
	bool readOnly = true,
	Func<float, float> sampleAdjuster = null
)
Request Example View Source

Parameters

categoryName
Type: SystemString
The name of the performance counter category (performance object) with which this performance counter is associated.
counterName
Type: SystemString
The name of the performance counter.
instanceName
Type: SystemString
The name of the performance counter category instance, or an empty string (""), if the category contains a single instance.
aliasName
Type: SystemString
The alias name for the PerformanceCounter object.
valueUnit
Type: SystemString
The measurement unit for the statistical values of the PerformanceCounter object.
valueDivisor
Type: SystemSingle
The divisor to be applied to the statistical values of the PerformanceCounter object.
readOnly (Optional)
Type: SystemBoolean
Flag that determines if this counter is read-only.
sampleAdjuster (Optional)
Type: SystemFuncSingle, Single
Defines a custom sample adjustment function for the counter.
See Also