Struct CobaltPoolStatistics
A point-in-time snapshot of the render pool's state and lifetime counters, returned by GetPoolStatistics(). Useful for health endpoints, capacity dashboards, and autoscaling signals.
The gauges (CurrentWorkers, LeasedWorkers, IdleWorkers, QueuedWaiters) are read without locking, so on a busy pool they are a close-but-not-transactional view; the cumulative counters are exact.
public readonly record struct CobaltPoolStatistics : IEquatable<CobaltPoolStatistics>
- Implements
- Inherited Members
Constructors
CobaltPoolStatistics(bool, int, int, int, int, int, int, int, long, long, long)
A point-in-time snapshot of the render pool's state and lifetime counters, returned by GetPoolStatistics(). Useful for health endpoints, capacity dashboards, and autoscaling signals.
The gauges (CurrentWorkers, LeasedWorkers, IdleWorkers, QueuedWaiters) are read without locking, so on a busy pool they are a close-but-not-transactional view; the cumulative counters are exact.
public CobaltPoolStatistics(bool Initialized, int MinSize, int MaxSize, int MaxQueueDepth, int CurrentWorkers, int LeasedWorkers, int IdleWorkers, int QueuedWaiters, long TotalRendersCompleted, long TotalRenderRetries, long TotalBusyRejections)
Parameters
InitializedboolFalse if the pool has not been created yet (no render or PreWarmAsync(CancellationToken) has run). Every other field is 0 in that case.
MinSizeintConfigured MinSize.
MaxSizeintConfigured MaxSize (the concurrent render ceiling).
MaxQueueDepthintConfigured MaxQueueDepth (0 = unbounded).
CurrentWorkersintLive worker processes right now (idle + leased).
LeasedWorkersintWorkers currently executing a render.
IdleWorkersintWarm workers sitting in the pool ready to serve.
QueuedWaitersintCallers currently blocked waiting for a free slot.
TotalRendersCompletedlongRenders that returned successfully over the pool's lifetime.
TotalRenderRetrieslongRenders transparently retried after a transient worker failure.
TotalBusyRejectionslongRequests rejected with PoolBusyException (backpressure).
Properties
CurrentWorkers
Live worker processes right now (idle + leased).
public int CurrentWorkers { get; init; }
Property Value
IdleWorkers
Warm workers sitting in the pool ready to serve.
public int IdleWorkers { get; init; }
Property Value
Initialized
False if the pool has not been created yet (no render or PreWarmAsync(CancellationToken) has run). Every other field is 0 in that case.
public bool Initialized { get; init; }
Property Value
LeasedWorkers
Workers currently executing a render.
public int LeasedWorkers { get; init; }
Property Value
MaxQueueDepth
Configured MaxQueueDepth (0 = unbounded).
public int MaxQueueDepth { get; init; }
Property Value
MaxSize
Configured MaxSize (the concurrent render ceiling).
public int MaxSize { get; init; }
Property Value
MinSize
Configured MinSize.
public int MinSize { get; init; }
Property Value
QueuedWaiters
Callers currently blocked waiting for a free slot.
public int QueuedWaiters { get; init; }
Property Value
TotalBusyRejections
Requests rejected with PoolBusyException (backpressure).
public long TotalBusyRejections { get; init; }
Property Value
TotalRenderRetries
Renders transparently retried after a transient worker failure.
public long TotalRenderRetries { get; init; }
Property Value
TotalRendersCompleted
Renders that returned successfully over the pool's lifetime.
public long TotalRendersCompleted { get; init; }