Class ProductionMonitor
- Namespace
- DotCompute.Runtime.Services
- Assembly
- DotCompute.Runtime.dll
Production monitoring service that tracks system health, performance metrics, and resource usage.
public sealed class ProductionMonitor : IDisposable
- Inheritance
-
ProductionMonitor
- Implements
- Inherited Members
- Extension Methods
Constructors
ProductionMonitor(ILogger<ProductionMonitor>)
Initializes a new instance of the ProductionMonitor class.
public ProductionMonitor(ILogger<ProductionMonitor> logger)
Parameters
loggerILogger<ProductionMonitor>The logger.
Properties
Statistics
Gets or sets the statistics.
public SystemMonitoringStatistics Statistics { get; }
Property Value
- SystemMonitoringStatistics
The statistics.
Methods
Dispose()
Performs dispose.
public void Dispose()
GetHealthCheckHistory(int)
Gets recent health check history.
public IReadOnlyList<HealthCheckResult> GetHealthCheckHistory(int maxResults = 20)
Parameters
maxResultsint
Returns
GetPerformanceMetrics()
Gets current performance metrics.
public IReadOnlyDictionary<string, PerformanceMetric> GetPerformanceMetrics()
Returns
PerformHealthCheckAsync(CancellationToken)
Performs a comprehensive health check of the system.
public Task<SystemHealthReport> PerformHealthCheckAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken
Returns
RecordPerformanceMetric(string, double, string?)
Records a performance metric for monitoring.
public void RecordPerformanceMetric(string metricName, double value, string? unit = null)