C# 클래스 GSF.Diagnostics.PerformanceMonitor

Represents a process performance monitor that operates similar to the Windows Performance Monitor utility that can be used to monitor system performance.
상속: IDisposable, IProvideStatus
파일 보기 프로젝트 열기: GridProtectionAlliance/gsf

공개 메소드들

메소드 설명
AddCounter ( PerformanceCounter counter ) : void

Adds a PerformanceCounter to be monitored.

AddCounter ( string categoryName, string counterName, string instanceName ) : void

Adds a PerformanceCounter to be monitored.

AddCounter ( string categoryName, string counterName, string instanceName, string aliasName ) : void

Adds a PerformanceCounter to be monitored.

AddCounter ( string categoryName, string counterName, string instanceName, string aliasName, string valueUnit ) : void

Adds a PerformanceCounter to be monitored.

AddCounter ( string categoryName, string counterName, string instanceName, string aliasName, string valueUnit, float valueDivisor, bool readOnly = true ) : void

Adds a PerformanceCounter to be monitored.

Dispose ( ) : void

Releases all the resources used by the PerformanceMonitor object.

FindCounter ( string counterName ) : PerformanceCounter

Returns a PerformanceCounter object matching the specified counter name.

First PerformanceCounter with matching name is returned. If same name exists within multiple monitored categories, use FindCounter(string,string) overload instead.

FindCounter ( string categoryName, string counterName ) : PerformanceCounter

Returns a PerformanceCounter object matching the specified counter name.

FindCounters ( string counterName ) : PerformanceCounter[]

Returns PerformanceCounter array matching the specified counter name.

FindCounters ( string categoryName, string counterName ) : PerformanceCounter[]

Returns PerformanceCounter array matching the specified counter name.

PerformanceMonitor ( ) : System

Initializes a new instance of the PerformanceMonitor class.

PerformanceMonitor ( double samplingInterval, bool addDefaultCounters = true ) : System

Initializes a new instance of the PerformanceMonitor class.

PerformanceMonitor ( string processName, bool addDefaultCounters = true ) : System

Initializes a new instance of the PerformanceMonitor class.

PerformanceMonitor ( string processName, double samplingInterval, bool addDefaultCounters = true ) : System

Initializes a new instance of the PerformanceMonitor class.

RemoveCounter ( PerformanceCounter counter ) : void

Removes a PerformanceCounter being monitored.

SampleCounters ( ) : void

Sample all defined counters.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the PerformanceMonitor object and optionally releases the managed resources.

비공개 메소드들

메소드 설명
m_samplingTimer_Elapsed ( object sender, ElapsedEventArgs e ) : void

메소드 상세

AddCounter() 공개 메소드

Adds a PerformanceCounter to be monitored.
public AddCounter ( PerformanceCounter counter ) : void
counter PerformanceCounter The object to be monitored.
리턴 void

AddCounter() 공개 메소드

Adds a PerformanceCounter to be monitored.
public AddCounter ( string categoryName, string counterName, string instanceName ) : void
categoryName string The name of the performance counter category (performance object) with which this performance counter is associated.
counterName string The name of the performance counter.
instanceName string The name of the performance counter category instance, or an empty string (""), if the category contains a single instance.
리턴 void

AddCounter() 공개 메소드

Adds a PerformanceCounter to be monitored.
public AddCounter ( string categoryName, string counterName, string instanceName, string aliasName ) : void
categoryName string The name of the performance counter category (performance object) with which this performance counter is associated.
counterName string The name of the performance counter.
instanceName string The name of the performance counter category instance, or an empty string (""), if the category contains a single instance.
aliasName string The alias name for the object.
리턴 void

AddCounter() 공개 메소드

Adds a PerformanceCounter to be monitored.
public AddCounter ( string categoryName, string counterName, string instanceName, string aliasName, string valueUnit ) : void
categoryName string The name of the performance counter category (performance object) with which this performance counter is associated.
counterName string The name of the performance counter.
instanceName string The name of the performance counter category instance, or an empty string (""), if the category contains a single instance.
aliasName string The alias name for the object.
valueUnit string The measurement unit for the statistical values of the object.
리턴 void

AddCounter() 공개 메소드

Adds a PerformanceCounter to be monitored.
public AddCounter ( string categoryName, string counterName, string instanceName, string aliasName, string valueUnit, float valueDivisor, bool readOnly = true ) : void
categoryName string The name of the performance counter category (performance object) with which this performance counter is associated.
counterName string The name of the performance counter.
instanceName string The name of the performance counter category instance, or an empty string (""), if the category contains a single instance.
aliasName string The alias name for the object.
valueUnit string The measurement unit for the statistical values of the object.
valueDivisor float The divisor to be applied to the statistical values of the object.
readOnly bool Flag that determines if this counter is read-only.
리턴 void

Dispose() 공개 메소드

Releases all the resources used by the PerformanceMonitor object.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Releases the unmanaged resources used by the PerformanceMonitor object and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
리턴 void

FindCounter() 공개 메소드

Returns a PerformanceCounter object matching the specified counter name.
First PerformanceCounter with matching name is returned. If same name exists within multiple monitored categories, use FindCounter(string,string) overload instead.
public FindCounter ( string counterName ) : PerformanceCounter
counterName string Name of the to be retrieved.
리턴 PerformanceCounter

FindCounter() 공개 메소드

Returns a PerformanceCounter object matching the specified counter name.
public FindCounter ( string categoryName, string counterName ) : PerformanceCounter
categoryName string Category of the to be retrieved.
counterName string Name of the to be retrieved.
리턴 PerformanceCounter

FindCounters() 공개 메소드

Returns PerformanceCounter array matching the specified counter name.
public FindCounters ( string counterName ) : PerformanceCounter[]
counterName string Name of the to be retrieved.
리턴 PerformanceCounter[]

FindCounters() 공개 메소드

Returns PerformanceCounter array matching the specified counter name.
public FindCounters ( string categoryName, string counterName ) : PerformanceCounter[]
categoryName string Category of the to be retrieved.
counterName string Name of the to be retrieved.
리턴 PerformanceCounter[]

PerformanceMonitor() 공개 메소드

Initializes a new instance of the PerformanceMonitor class.
public PerformanceMonitor ( ) : System
리턴 System

PerformanceMonitor() 공개 메소드

Initializes a new instance of the PerformanceMonitor class.
public PerformanceMonitor ( double samplingInterval, bool addDefaultCounters = true ) : System
samplingInterval double Interval, in milliseconds, at which the are to be sampled.
addDefaultCounters bool Set to true to add default counters; otherwise false.
리턴 System

PerformanceMonitor() 공개 메소드

Initializes a new instance of the PerformanceMonitor class.
public PerformanceMonitor ( string processName, bool addDefaultCounters = true ) : System
processName string Name of the whose performance is to be monitored.
addDefaultCounters bool Set to true to add default counters; otherwise false.
리턴 System

PerformanceMonitor() 공개 메소드

Initializes a new instance of the PerformanceMonitor class.
public PerformanceMonitor ( string processName, double samplingInterval, bool addDefaultCounters = true ) : System
processName string Name of the whose performance is to be monitored.
samplingInterval double Interval, in milliseconds, at which the are to be sampled.
addDefaultCounters bool Set to true to add default counters; otherwise false.
리턴 System

RemoveCounter() 공개 메소드

Removes a PerformanceCounter being monitored.
public RemoveCounter ( PerformanceCounter counter ) : void
counter PerformanceCounter The object to be unmonitored.
리턴 void

SampleCounters() 공개 메소드

Sample all defined counters.
public SampleCounters ( ) : void
리턴 void