EventCounter EventCounter EventCounter 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) EventCounter(String, EventSource) EventCounter(String, EventSource) EventCounter(String, EventSource)

Initializes a new instance of the EventCounter class.

Methods

AddMetadata(String, String) AddMetadata(String, String) AddMetadata(String, String) AddMetadata(String, String)

Adds key-value metadata to the counter that will be included as a part of the payload.

(Inherited from DiagnosticCounter)
Dispose() Dispose() Dispose() Dispose()
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string representation of the current event counter instance.

WriteMetric(Double) WriteMetric(Double) WriteMetric(Double) WriteMetric(Double)

Writes the metric if performance counters are on.

WriteMetric(Single) WriteMetric(Single) WriteMetric(Single) WriteMetric(Single)

Writes the metric if performance counters are on.

Properties

DisplayName DisplayName DisplayName DisplayName

Gets or sets the display name of the counter.

(Inherited from DiagnosticCounter)
DisplayUnits DisplayUnits DisplayUnits DisplayUnits

Gets or sets the display units of the counter.

(Inherited from DiagnosticCounter)
EventSource EventSource EventSource EventSource

Gets the EventSource that this counter is attached to.

(Inherited from DiagnosticCounter)
Name Name Name Name

Gets the name of this counter.

(Inherited from DiagnosticCounter)

Applies to