This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!
PerformanceCounter Members
Public:
Constructor
Properties
CategoryName |
Returns the performance category name for this performance counter |
CounterHelp |
Returns the description message for this performance counter |
CounterName |
Sets/returns the performance counter name for this performance counter |
CounterType |
Sets/Returns the counter type for this performance counter |
InstanceName |
Sets/returns an instance name for this performance counter |
MachineName |
Set/returns the machine name for this performance counter |
RawValue |
Directly accesses the raw value of this counter. If counter type is of a 32-bit size, it will truncate the value given to 32 bits. This can be significantly more performant for scenarios where the raw value is sufficient. Note that this only works for custom counters created using this component, non-custom counters will throw an exception if this property is accessed. |
ReadOnly |
Returns true if counter is read only (system counter, foreign extensible counter or remote counter) |
SingleInstance |
Indicates if this counter only has a single instance. Some counters may support multiple instances, for example the processor counter will have one instance per processor on the machine. |
Site (inherited from Component) |
Gets or sets the site of the Component. |
Methods
CategoryExists |
Overloaded. [To be supplied.] |
Close |
Frees all the resources allocated by this counter |
CloseSharedResources |
Frees all the resources allocated for all performance counters, frees File Mapping used by extensible counters, unloads dll's used to read counters. |
CreateCategory |
Overloaded. [To be supplied.] |
DeleteCategory |
Overloaded. [To be supplied.] |
Dispose (inherited from Component) |
Disposes of the Component. |
Equals (inherited from Object) |
Determines whether the specified Object is the same instance as the current Object. Subclasses are expected to override this method to support value equality (not reference equality). |
Exists |
Overloaded. [To be supplied.] |
GetContainer (inherited from Component) |
Returns the IContainer that contains the Component. |
GetDesignMode (inherited from Component) |
Gets a value indicating whether the Component is currently in design mode. |
GetHashCode (inherited from Object) |
Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. |
GetServiceObject (inherited from Component) |
Returns an object representing a service provided by the Component. |
GetType (inherited from Object) |
Gets the Type of the Object. |
IncrementBy |
Increments the value of this counter. If counter type is of a 32-bit size, it'll truncate the value given to 32 bits. |
IsSingleInstance |
Returns true if the performance category for this object is a single instance category |
NextSample |
Obtains a counter sample and returns the raw value for it. |
NextValue |
Obtains a counter sample and returns the calculated value for it. NOTE: For counters whose calculated value depend upon 2 counter reads, the very first read will return 0.0. |
ReadCategory |
Reads all the counter and instance data of this performance category. |
RefreshSharedResources |
Used to refresh all the resources allocated for all performance counters, it will refresh the File Mapping used to write to extensible counters and the dll's used to read system counters. |
RemoveInstance |
Removes this counter instance from the shared memory |
ToString (inherited from Component) |
Returns a String containing the name of the Component, if any. This method should not be overridden. For internal use only. |
Protected:
Methods
Finalize (inherited from Object) |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by the Garbage Collector (GC). This method may be ignored by the runtime; therefore, necessary cleanup operations should be done elsewhere. |
MemberwiseClone (inherited from Object) |
Creates a shallow copy of the current Object. |
See Also
PerformanceCounter Class | System.Diagnostics Namespace