Class SloEvaluator

java.lang.Object
org.mockserver.slo.SloEvaluator

public class SloEvaluator extends Object
Evaluates an SloCriteria against the samples in SloSampleStore, producing an SloVerdict. Pure in-memory computation — no I/O, no blocking; the window is always already-elapsed.

Window resolution. A SloWindow.Type.LOOKBACK window resolves to [now - lookbackMillis, now] using the controllable clock (TimeService.currentTimeMillis()); an SloWindow.Type.EXPLICIT window uses its given [from, to] bounds verbatim.

Per-objective evaluation. LATENCY_P* objectives compute the percentile over the in-window latencies (copied algorithm from PercentileTracker); ERROR_RATE computes errors / total and is SloVerdict.Result.INCONCLUSIVE when total == 0. An objective with no latency samples is also INCONCLUSIVE.

AND-ing. The top-level verdict is: any objective FAIL → FAIL; else any objective INCONCLUSIVE, or the whole window below minimumSampleCount → INCONCLUSIVE; else PASS.

  • Constructor Details

    • SloEvaluator

      public SloEvaluator()
    • SloEvaluator

      public SloEvaluator(SloSampleStore sampleStore)
  • Method Details