Class NodeMetrics.Types.Metric
  Metrics key/value.
Equality of Metric is based on its name index.
    Inheritance
    
    NodeMetrics.Types.Metric
   
  
  
  
  Assembly: Akka.Cluster.Metrics.dll
  Syntax
  
    public sealed class NodeMetrics.Types.Metric : IEquatable<NodeMetrics.Types.Metric>
   
  Constructors
  
    |
    Edit this page
  
  
    View Source
  
  
  Metric(string, AnyNumber, Option<EWMA>)
  
  
  Declaration
  
    public Metric(string name, AnyNumber value, Option<NodeMetrics.Types.EWMA> average)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | string | name | The metric name | 
      
        | AnyNumber | value | The metric value, which must be a valid numerical value,
a valid value is neither negative nor NaN/Infinite. | 
      
        | Option<NodeMetrics.Types.EWMA> | average | The data stream of the metric value, for trending over time. Metrics that are already
averages (e.g. system load average) or finite (e.g. as number of processors), are not trended. | 
    
  
  Properties
  
    |
    Edit this page
  
  
    View Source
  
  
  Average
  
  
  Declaration
  
    public Option<NodeMetrics.Types.EWMA> Average { get; }
   
  Property Value
  
  
    |
    Edit this page
  
  
    View Source
  
  
  IsSmooth
  Returns true if this value is smoothed
Declaration
  
    public bool IsSmooth { get; }
   
  Property Value
  
  
    |
    Edit this page
  
  
    View Source
  
  
  Name
  
  
  Declaration
  
    public string Name { get; }
   
  Property Value
  
  
    |
    Edit this page
  
  
    View Source
  
  
  SmoothValue
  The numerical value of the average, if defined, otherwise the latest value
Declaration
  
    public double SmoothValue { get; }
   
  Property Value
  
  
    |
    Edit this page
  
  
    View Source
  
  
  Value
  
  
  Declaration
  
    public AnyNumber Value { get; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | AnyNumber |  | 
    
  
  Methods
  
    |
    Edit this page
  
  
    View Source
  
  
  Add(Metric)
  Updates the data point, and if defined, updates the data stream (average).
Returns the updated metric.
Declaration
  
    public NodeMetrics.Types.Metric Add(NodeMetrics.Types.Metric latest)
   
  Parameters
  
  Returns
  
  
    |
    Edit this page
  
  
    View Source
  
  
  Create(string, AnyNumber)
  Creates a new Metric instance if the value is valid, otherwise None
is returned. Invalid numeric values are negative and NaN/Infinite.
Declaration
  
    public static Option<NodeMetrics.Types.Metric> Create(string name, AnyNumber value)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | string | name |  | 
      
        | AnyNumber | value |  | 
    
  
  Returns
  
  
    |
    Edit this page
  
  
    View Source
  
  
  Create(string, AnyNumber, Option<double>)
  Creates a new Metric instance if the value is valid, otherwise None
is returned. Invalid numeric values are negative and NaN/Infinite.
Declaration
  
    public static Option<NodeMetrics.Types.Metric> Create(string name, AnyNumber value, Option<double> decayFactor)
   
  Parameters
  
  Returns
  
  
    |
    Edit this page
  
  
    View Source
  
  
  Create(string, Try<AnyNumber>, Option<double>)
  Creates a new Metric instance if the Try is successful and the value is valid,
otherwise None is returned. Invalid numeric values are negative and NaN/Infinite.
Declaration
  
    public static Option<NodeMetrics.Types.Metric> Create(string name, Try<AnyNumber> value, Option<double> decayFactor)
   
  Parameters
  
  Returns
  
  
    |
    Edit this page
  
  
    View Source
  
  
  CreateEWMA(AnyNumber, Option<double>)
  
  
  Declaration
  
    public static Option<NodeMetrics.Types.EWMA> CreateEWMA(AnyNumber value, Option<double> decayFactor)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | AnyNumber | value |  | 
      
        | Option<double> | decayFactor |  | 
    
  
  Returns
  
  
    |
    Edit this page
  
  
    View Source
  
  
  Equals(Metric?)
  
  
  Declaration
  
    public bool Equals(NodeMetrics.Types.Metric? other)
   
  Parameters
  
  Returns
  
  
    |
    Edit this page
  
  
    View Source
  
  
  Equals(object?)
  
  
  Declaration
  
    public override bool Equals(object? obj)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | object | obj |  | 
    
  
  Returns
  
  Overrides
  
  
    |
    Edit this page
  
  
    View Source
  
  
  GetHashCode()
  
  
  Declaration
  
    public override int GetHashCode()
   
  Returns
  
  Overrides
  
  
    |
    Edit this page
  
  
    View Source
  
  
  SameAs(Metric)
  Returns true if 
that
 is tracking the same metric as this.
Declaration
  
    public bool SameAs(NodeMetrics.Types.Metric that)
   
  Parameters
  
  Returns
  
  Operators
  
    |
    Edit this page
  
  
    View Source
  
  
  operator +(Metric, Metric)
  Updates the data point, and if defined, updates the data stream (average).
Returns the updated metric.
Declaration
  
    public static NodeMetrics.Types.Metric operator +(NodeMetrics.Types.Metric m1, NodeMetrics.Types.Metric m2)
   
  Parameters
  
  Returns
  
  Implements
  
  Extension Methods