Package org.mockserver.load
Class LoadThreshold
java.lang.Object
org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
org.mockserver.model.ObjectWithJsonToString
org.mockserver.load.LoadThreshold
One in-run pass/fail threshold for a
LoadScenario: a load metric compared against a
threshold value. All a scenario's thresholds must hold for the run verdict to be PASS
(logical AND); any breach makes the verdict FAIL.
Thresholds are evaluated on the orchestrator's control tick from per-run data (this
run's HDR latency histogram and its request counters) — never from the global
SloSampleStore, which aggregates all forward traffic rather than this
one run. The comparison reuses SloObjective.Comparator (and its
SloObjective.satisfiedBy(double) semantics) so the two features share one comparator
vocabulary, but a load threshold is otherwise independent of the SLO verify feature.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe per-run metric a threshold is evaluated against. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublestatic LoadThresholdbooleansatisfiedBy(double observed) withComparator(SloObjective.Comparator comparator) withMetric(LoadThreshold.Metric metric) withThreshold(double threshold) Methods inherited from class org.mockserver.model.ObjectWithJsonToString
toStringMethods inherited from class org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
equals, fieldsExcludedFromEqualsAndHashCode, hashCode
-
Constructor Details
-
LoadThreshold
public LoadThreshold()
-
-
Method Details
-
loadThreshold
-
getMetric
-
withMetric
-
getComparator
-
withComparator
-
getThreshold
public double getThreshold() -
withThreshold
-
satisfiedBy
public boolean satisfiedBy(double observed) - Returns:
- true when
observedsatisfies this threshold'scomparatoragainst itsthresholdvalue, using the same comparison semantics asSloObjective.satisfiedBy(double).
-