A metrics-observable instrument that reports increasing or decreasing values when the instrument is being observed. Use this instrument to monitor the process heap size or the approximate number of items in a lock-free circular buffer, for example. To create an ObservableUpDownCounter object, use the CreateObservableUpDownCounter methods.
generic <typename T>
where T : value classpublic ref class ObservableUpDownCounter sealed : System::Diagnostics::Metrics::ObservableInstrument<T>
public sealed class ObservableUpDownCounter<T> : System.Diagnostics.Metrics.ObservableInstrument<T> where T : struct
type ObservableUpDownCounter<'T (requires 'T : struct)> = class
inherit ObservableInstrument<'T (requires 'T : struct)>
Public NotInheritable Class ObservableUpDownCounter(Of T)
Inherits ObservableInstrument(Of T)
Type Parameters
The type that the counter represents.
Note
Unlike UpDownCounter
, which takes the increment/delta value, the callback function reports the absolute value of the ObservableUpDownCounter
. To determine the reported rate that the ObservableUpDownCounter
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)Collaborate 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