Table of Contents

Class ComponentHealth

Namespace
DotCompute.Backends.Metal.Telemetry
Assembly
DotCompute.Backends.Metal.dll

Component health information

public sealed class ComponentHealth
Inheritance
ComponentHealth
Inherited Members

Constructors

ComponentHealth(string)

Component health information

public ComponentHealth(string componentName)

Parameters

componentName string

Properties

ComponentName

public string ComponentName { get; }

Property Value

string

ErrorCount

public int ErrorCount { get; }

Property Value

int

LastCheckTime

public DateTimeOffset LastCheckTime { get; set; }

Property Value

DateTimeOffset

LastError

public string? LastError { get; set; }

Property Value

string

Properties

public Dictionary<string, object> Properties { get; }

Property Value

Dictionary<string, object>

Status

public HealthStatus Status { get; set; }

Property Value

HealthStatus

SuccessCount

public int SuccessCount { get; }

Property Value

int

SuccessRate

public double SuccessRate { get; }

Property Value

double

Methods

RecordError(MetalError, string)

public void RecordError(MetalError error, string context)

Parameters

error MetalError
context string

RecordMemoryPressure(MemoryPressureLevel, double)

public void RecordMemoryPressure(MemoryPressureLevel level, double percentage)

Parameters

level MemoryPressureLevel
percentage double

RecordSuccess(string, TimeSpan)

public void RecordSuccess(string operation, TimeSpan duration)

Parameters

operation string
duration TimeSpan