Table of Contents

Class MetalHealthMonitor

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

Continuous health monitoring for Metal backend with anomaly detection

public sealed class MetalHealthMonitor : IDisposable
Inheritance
MetalHealthMonitor
Implements
Inherited Members
Extension Methods

Constructors

MetalHealthMonitor(ILogger<MetalHealthMonitor>, MetalHealthMonitorOptions)

public MetalHealthMonitor(ILogger<MetalHealthMonitor> logger, MetalHealthMonitorOptions options)

Parameters

logger ILogger<MetalHealthMonitor>
options MetalHealthMonitorOptions

Methods

AnalyzeHealth()

Analyzes health trends and patterns

public MetalHealthAnalysis AnalyzeHealth()

Returns

MetalHealthAnalysis

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

GetCurrentHealth()

Gets current overall health status

public HealthStatus GetCurrentHealth()

Returns

HealthStatus

GetDetailedHealthReport()

Gets detailed health information for all components

public MetalHealthReport GetDetailedHealthReport()

Returns

MetalHealthReport

PerformCleanup(DateTimeOffset)

Performs cleanup of old health events

public void PerformCleanup(DateTimeOffset cutoffTime)

Parameters

cutoffTime DateTimeOffset

ReportError(MetalError, string)

Reports an error to the health monitoring system

public void ReportError(MetalError error, string context)

Parameters

error MetalError
context string

ReportMemoryPressure(MemoryPressureLevel, double)

Reports memory pressure to the health monitoring system

public void ReportMemoryPressure(MemoryPressureLevel level, double percentage)

Parameters

level MemoryPressureLevel
percentage double

ReportSuccess(string, string, TimeSpan)

Reports successful operation to improve health status

public void ReportSuccess(string component, string operation, TimeSpan duration)

Parameters

component string
operation string
duration TimeSpan