Class StandardMetrics.Cpu
CPU metrics
Inherited Members
Namespace: Akka.Cluster.Metrics
Assembly: Akka.Cluster.Metrics.dll
Syntax
public sealed class Cpu
Constructors
| Improve this Doc View SourceCpu(Address, Int64, Double, Double, Int32)
Creates new instance of StandardMetrics.Cpu
Declaration
public Cpu(Address address, long timestamp, double cpuProcessUsage, double cpuTotalUsage, int processorsNumber)
Parameters
Type | Name | Description |
---|---|---|
Address | address | Address of the node the metrics are gathered at |
Int64 | timestamp | The time of sampling, in milliseconds since midnight, January 1, 1970 UTC |
Double | cpuProcessUsage | CPU usage by current process in percentage (in [0, 1] range) |
Double | cpuTotalUsage | CPU usage by all processes in percentage (in [0, 1] range) |
Int32 | processorsNumber | The number of available processors |
Properties
| Improve this Doc View SourceAddress
Address of the node the metrics are gathered at
Declaration
public Address Address { get; }
Property Value
Type | Description |
---|---|
Address |
ProcessorsNumber
The number of available processors
Declaration
public int ProcessorsNumber { get; }
Property Value
Type | Description |
---|---|
Int32 |
ProcessUsage
CPU usage by current process in percentage (in [0, 1] range)
Declaration
public double ProcessUsage { get; }
Property Value
Type | Description |
---|---|
Double |
Timestamp
The time of sampling, in milliseconds since midnight, January 1, 1970 UTC
Declaration
public long Timestamp { get; }
Property Value
Type | Description |
---|---|
Int64 |
TotalUsage
CPU usage by all processes in percentage (in [0, 1] range)
Declaration
public double TotalUsage { get; }
Property Value
Type | Description |
---|---|
Double |
Methods
| Improve this Doc View SourceDecompose(NodeMetrics)
Given a NodeMetrics it returns the Cpu data if the nodeMetrics contains necessary heap metrics.
Declaration
public static Option<(Address Address, long Timestamp, double CpuProcessUsage, double CpuTotalUsage, int Processors)> Decompose(NodeMetrics nodeMetrics)
Parameters
Type | Name | Description |
---|---|---|
NodeMetrics | nodeMetrics |
Returns
Type | Description |
---|---|
Option<System.ValueTuple<Address, Int64, Double, Double, Int32>> | If possible a tuple matching the Cpu constructor parameters |