C# Class PerformanceCounters.PerfmormanceMonitor

A helper class to create the specified performance counters. http://madskristensen.net/post/create-performance-counters-using-net-and-c
Datei anzeigen Open project: jquintus/spikes

Public Methods

Method Description
AddCounter ( string name, string helpText, PerformanceCounterType type ) : void

Add a performance counter to the category of performance counters.

CreateCounter ( string name, string instanceName ) : PerformanceCounter
CreateCounters ( ) : void

Creates the performance counters

DeleteCounters ( ) : void
GetCounter ( string name ) : PerformanceCounter
PerfmormanceMonitor ( string categoryNameSingleInstance, string categoryMultiInstance ) : System.Diagnostics

Creates an instance of the class.

Private Methods

Method Description
AddCounter ( string name, string helpText, PerformanceCounterType type, System.Diagnostics.CounterCreationDataCollection counters ) : void

Method Details

AddCounter() public method

Add a performance counter to the category of performance counters.
public AddCounter ( string name, string helpText, PerformanceCounterType type ) : void
name string
helpText string
type PerformanceCounterType
return void

CreateCounter() public method

public CreateCounter ( string name, string instanceName ) : PerformanceCounter
name string
instanceName string
return System.Diagnostics.PerformanceCounter

CreateCounters() public method

Creates the performance counters
public CreateCounters ( ) : void
return void

DeleteCounters() public method

public DeleteCounters ( ) : void
return void

GetCounter() public method

public GetCounter ( string name ) : PerformanceCounter
name string
return System.Diagnostics.PerformanceCounter

PerfmormanceMonitor() public method

Creates an instance of the class.
public PerfmormanceMonitor ( string categoryNameSingleInstance, string categoryMultiInstance ) : System.Diagnostics
categoryNameSingleInstance string The name of the performance counter category.
categoryMultiInstance string
return System.Diagnostics