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 Metric : IEquatable<NodeMetrics.Types.Metric>
Constructors
|
Improve this Doc
View Source
Metric(String, AnyNumber, Option<NodeMetrics.Types.EWMA>)
Declaration
public Metric(string name, AnyNumber value, Option<NodeMetrics.Types.EWMA> average)
Parameters
Type |
Name |
Description |
String |
name |
The metric name
|
Akka.Cluster.Metrics.Helpers.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
|
Improve this Doc
View Source
Average
Declaration
public Option<NodeMetrics.Types.EWMA> Average { get; }
Property Value
|
Improve this Doc
View Source
IsSmooth
Returns true if this value is smoothed
Declaration
public bool IsSmooth { get; }
Property Value
|
Improve this Doc
View Source
Name
Declaration
public string Name { get; }
Property Value
|
Improve this Doc
View Source
SmoothValue
The numerical value of the average, if defined, otherwise the latest value
Declaration
public double SmoothValue { get; }
Property Value
|
Improve this Doc
View Source
Value
Declaration
public AnyNumber Value { get; }
Property Value
Type |
Description |
Akka.Cluster.Metrics.Helpers.AnyNumber |
|
Methods
|
Improve this Doc
View Source
Add(NodeMetrics.Types.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
|
Improve this Doc
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 |
|
Akka.Cluster.Metrics.Helpers.AnyNumber |
value |
|
Returns
|
Improve this Doc
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
Type |
Name |
Description |
String |
name |
|
Akka.Cluster.Metrics.Helpers.AnyNumber |
value |
|
Option<Double> |
decayFactor |
|
Returns
|
Improve this Doc
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
Type |
Name |
Description |
String |
name |
|
Try<Akka.Cluster.Metrics.Helpers.AnyNumber> |
value |
|
Option<Double> |
decayFactor |
|
Returns
|
Improve this Doc
View Source
CreateEWMA(AnyNumber, Option<Double>)
Declaration
public static Option<NodeMetrics.Types.EWMA> CreateEWMA(AnyNumber value, Option<double> decayFactor)
Parameters
Type |
Name |
Description |
Akka.Cluster.Metrics.Helpers.AnyNumber |
value |
|
Option<Double> |
decayFactor |
|
Returns
|
Improve this Doc
View Source
Equals(NodeMetrics.Types.Metric)
Declaration
public bool Equals(NodeMetrics.Types.Metric other)
Parameters
Returns
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
|
Improve this Doc
View Source
SameAs(NodeMetrics.Types.Metric)
Returns true if
that
is tracking the same metric as this.
Declaration
public bool SameAs(NodeMetrics.Types.Metric that)
Parameters
Returns
Operators
|
Improve this Doc
View Source
Addition(NodeMetrics.Types.Metric, NodeMetrics.Types.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