Class StandardMetrics.Cpu
CPU metrics
Inherited Members
Namespace: Akka.Cluster.Metrics
Assembly: Akka.Cluster.Metrics.dll
Syntax
public sealed class StandardMetrics.Cpu
Constructors
| Edit this page View SourceCpu(Address, long, double, double, int)
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 |
long | 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) |
int | processorsNumber | The number of available processors |
Properties
| Edit this page View SourceAddress
Address of the node the metrics are gathered at
Declaration
public Address Address { get; }
Property Value
Type | Description |
---|---|
Address |
ProcessUsage
CPU usage by current process in percentage (in [0, 1] range)
Declaration
public double ProcessUsage { get; }
Property Value
Type | Description |
---|---|
double |
ProcessorsNumber
The number of available processors
Declaration
public int ProcessorsNumber { get; }
Property Value
Type | Description |
---|---|
int |
Timestamp
The time of sampling, in milliseconds since midnight, January 1, 1970 UTC
Declaration
public long Timestamp { get; }
Property Value
Type | Description |
---|---|
long |
TotalUsage
CPU usage by all processes in percentage (in [0, 1] range)
Declaration
public double TotalUsage { get; }
Property Value
Type | Description |
---|---|
double |
Methods
| Edit this page 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<(Address Address, long Timestamp, double CpuProcessUsage, double CpuTotalUsage, int Processors)> | If possible a tuple matching the Cpu constructor parameters |