IncrementingPollingCounter Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides a variant of EventCounter for variables that are ever-increasing, such as the number of exceptions in the runtime.
public ref class IncrementingPollingCounter : System::Diagnostics::Tracing::DiagnosticCounter
public class IncrementingPollingCounter : System.Diagnostics.Tracing.DiagnosticCounter
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public class IncrementingPollingCounter : System.Diagnostics.Tracing.DiagnosticCounter
type IncrementingPollingCounter = class
inherit DiagnosticCounter
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
type IncrementingPollingCounter = class
inherit DiagnosticCounter
Public Class IncrementingPollingCounter
Inherits DiagnosticCounter
- Inheritance
- Attributes
IncrementingPollingCounter objects live as long as the EventSource that they are attached to unless they are explicitly disposed.
totalValueProvider
is a method used for polling the values at the interval specified by the listener. This method is expected to return an incrementing float value; otherwise, an increment of a negative value may be reported.
IncrementingPollingCounter
does not calculate statistics like mean and standard deviation because it only accumulates the counter value. Unlike IncrementingEventCounter, this takes in a polling callback that it can call to update its own metric periodically.
For an example that uses IncrementingPollingCounter inside the runtime as for runtime performance counters, see the CoreCLR source for RuntimeEventSource on GitHub.
Incrementing |
Initializes a new instance of the IncrementingPollingCounter class. |
Display |
Gets or sets the display name of the counter. (Inherited from DiagnosticCounter) |
Display |
Gets or sets rate at which this metric should be displayed as. |
Display |
Gets or sets the display units of the counter. (Inherited from DiagnosticCounter) |
Event |
Gets the EventSource that this counter is attached to. (Inherited from DiagnosticCounter) |
Name |
Gets the name of this counter. (Inherited from DiagnosticCounter) |
Add |
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. (Inherited from DiagnosticCounter) |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
Get |
Serves as the default hash function. (Inherited from Object) |
Get |
Gets the Type of the current instance. (Inherited from Object) |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
To |
Returns a string representation of the current incrementing polling counter instance. |
Product | Versions |
---|---|
.NET | Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Standard | 2.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: