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
loggerILogger<MetalHealthMonitor>optionsMetalHealthMonitorOptions
Methods
AnalyzeHealth()
Analyzes health trends and patterns
public MetalHealthAnalysis AnalyzeHealth()
Returns
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
GetDetailedHealthReport()
Gets detailed health information for all components
public MetalHealthReport GetDetailedHealthReport()
Returns
PerformCleanup(DateTimeOffset)
Performs cleanup of old health events
public void PerformCleanup(DateTimeOffset cutoffTime)
Parameters
cutoffTimeDateTimeOffset
ReportError(MetalError, string)
Reports an error to the health monitoring system
public void ReportError(MetalError error, string context)
Parameters
errorMetalErrorcontextstring
ReportMemoryPressure(MemoryPressureLevel, double)
Reports memory pressure to the health monitoring system
public void ReportMemoryPressure(MemoryPressureLevel level, double percentage)
Parameters
levelMemoryPressureLevelpercentagedouble
ReportSuccess(string, string, TimeSpan)
Reports successful operation to improve health status
public void ReportSuccess(string component, string operation, TimeSpan duration)