Represents a metrics-observable instrument that reports monotonically increasing values when the instrument is being observed, for example, CPU time (for different processes, threads, user mode, or kernel mode). Call CreateObservableCounter to create the observable counter object.
generic <typename T>
where T : value classpublic ref class ObservableCounter sealed : System::Diagnostics::Metrics::ObservableInstrument<T>
public sealed class ObservableCounter<T> : System.Diagnostics.Metrics.ObservableInstrument<T> where T : struct
type ObservableCounter<'T (requires 'T : struct)> = class
inherit ObservableInstrument<'T (requires 'T : struct)>
Public NotInheritable Class ObservableCounter(Of T)
Inherits ObservableInstrument(Of T)
Type Parameters
The type that the observable counter represents.
Note
Unlike Counter
, which takes the increment/delta value, the callback function reports the absolute value of the counter. To determine the reported rate the counter is changing, the difference between successive measurements is used.
This class supports only the following generic parameter types: Byte, Int16, Int32, Int64, Single, Double, and Decimal.
Properties Methods 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) Observe()Fetches the current measurements being tracked by this instrument. All classes extending ObservableInstrument{T} need to implement this method.
(Inherited from ObservableInstrument<T>) Publish()Activates the instrument to start recording measurements and to allow listeners to start listening to such measurements.
(Inherited from Instrument) ToString()Returns a string that represents the current object.
(Inherited from Object) See alsoCollaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. In this articleWas this page helpful?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4