EventCounter Class
Definition
Provides the ability to collect statistics for very frequent events through the EventSource class.
public ref class EventCounter
public class EventCounter
type EventCounter = class
Public Class EventCounter
- Inheritance
Remarks
For an example of how to use the EventCounter class, see Introduction Tutorial: How to measure performance for very frequent events using EventCounters.
Constructors
EventCounter(String, EventSource) |
Initializes a new instance of the EventCounter class. |
Properties
DisplayName |
Gets or sets the display name of the counter. (Inherited from DiagnosticCounter) |
DisplayUnits |
Gets or sets the display units of the counter. (Inherited from DiagnosticCounter) |
EventSource |
Gets the EventSource that this counter is attached to. (Inherited from DiagnosticCounter) |
Name |
Gets the name of this counter. (Inherited from DiagnosticCounter) |
Methods
AddMetadata(String, String) |
Adds key-value metadata to the counter that will be included as a part of the payload. (Inherited from DiagnosticCounter) |
Dispose() |
Removes the counter from the set that the EventSource will report on. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
GetHashCode() |
Serves as the default hash function. (Inherited from Object) |
GetType() |
Gets the Type of the current instance. (Inherited from Object) |
MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherited from Object) |
ToString() |
Returns a string representation of the current event counter instance. |
WriteMetric(Double) |
Writes the metric if performance counters are on. |
WriteMetric(Single) |
Writes the metric if performance counters are on. |