Warmup
The adaptive threshold needs a reference for “healthy” latency. fluxgo captures it at startup during the warmup period.
Behaviour
Section titled “Behaviour”- Warmup lasts
WarmupDuration(30 s by default). Set it to0to skip warmup. - While
IsWarmingUpis true, the circuit behaves like a static breaker, so cold-start traffic cannot cause a false trip. - At the end, the baselines
SbaseandPbaseare stored and the adaptive threshold takes over.
A baseline must be healthy
Section titled “A baseline must be healthy”A baseline captured while the dependency is already failing would be useless, so
a capture is only accepted when the failure rate during warmup stays at or below
WarmupMaxFailRate (5% by default).
Checking the state
Section titled “Checking the state”if cb.Snapshot().IsWarmingUp { // still on the static threshold; baselines are not set yet}