Table of Contents

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

logger ILogger<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

maxResults int

Returns

IReadOnlyList<HealthCheckResult>

GetPerformanceMetrics()

Gets current performance metrics.

public IReadOnlyDictionary<string, PerformanceMetric> GetPerformanceMetrics()

Returns

IReadOnlyDictionary<string, PerformanceMetric>

PerformHealthCheckAsync(CancellationToken)

Performs a comprehensive health check of the system.

public Task<SystemHealthReport> PerformHealthCheckAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task<SystemHealthReport>

RecordPerformanceMetric(string, double, string?)

Records a performance metric for monitoring.

public void RecordPerformanceMetric(string metricName, double value, string? unit = null)

Parameters

metricName string
value double
unit string