Muokkaa

Jaa


EventCounter Class

Definition

Provides the ability to collect statistics for very frequent events through the EventSource class.

public ref class EventCounter : System::Diagnostics::Tracing::DiagnosticCounter
public ref class EventCounter
public ref class EventCounter : IDisposable
public class EventCounter : System.Diagnostics.Tracing.DiagnosticCounter
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public class EventCounter : System.Diagnostics.Tracing.DiagnosticCounter
public class EventCounter
public class EventCounter : IDisposable
type EventCounter = class
    inherit DiagnosticCounter
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
type EventCounter = class
    inherit DiagnosticCounter
type EventCounter = class
type EventCounter = class
    interface IDisposable
Public Class EventCounter
Inherits DiagnosticCounter
Public Class EventCounter
Public Class EventCounter
Implements IDisposable
Inheritance
EventCounter
Inheritance
EventCounter
Attributes
Implements

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.

Dispose()

Removes the counter from the set that the EventSource will report on.

(Inherited from DiagnosticCounter)
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.

ToString()

Returns a string that represents the current object.

(Inherited from Object)
WriteMetric(Double)

Writes the metric if performance counters are on.

WriteMetric(Single)

Writes the metric if performance counters are on.

Applies to

See also