TsgcWSCircuitBreakerProperties › TimeWindow

TimeWindow Property

Rolling window (width and bucket count) against which all thresholds are evaluated.

Syntax

property TimeWindow: TsgcCircuitBreakerWindow read FTimeWindow
      write SetTimeWindow;

Default Value

Remarks

Defines the sliding window used for threshold evaluation. The window is divided into BucketCount sub-buckets so older counters age out smoothly as time advances — each bucket holds independent success / failure / slow counters and the Thresholds checks always sum over live buckets only. Sub-properties: RollingWindowSec (total width of the rolling window in seconds, default 60) and BucketCount (number of sub-buckets, default 10). Longer windows smooth noise and avoid tripping on transient spikes; shorter windows react faster to outages. More buckets give smoother aging at a slightly higher memory cost per tracked key.

Example

// 30-second rolling window split into 6 buckets of 5 seconds each
sgcWSCircuitBreaker1.TimeWindow.RollingWindowSec := 30;
sgcWSCircuitBreaker1.TimeWindow.BucketCount := 6;

Back to Properties