Package org.mockserver.load
Class LoadProfile
java.lang.Object
org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
org.mockserver.model.ObjectWithJsonToString
org.mockserver.load.LoadProfile
The load profile of a
LoadScenario: an ordered list of LoadStages the orchestrator
runs in sequence. Each stage holds or ramps a setpoint — concurrent virtual users
(closed model, LoadStageType.VU), an arrival rate in iterations/second (open model,
LoadStageType.RATE), or no load at all (LoadStageType.PAUSE) — for its
durationMillis, optionally shaped by a RampCurve.
The total run duration is the sum of the stage durations; the orchestrator advances stage by
stage and ends after the last one (or when maxRequests is hit, or on stop). Per-stage
setpoint functions (LoadStage.targetVusAt(long) / LoadStage.targetRateAt(long)) are
pure and deterministic so ramp progression is unit-testable without driving traffic.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LoadProfileconstant(int vus, long durationMillis) Convenience: a single constant-VU stage.static LoadProfileconstantRate(double rate, long durationMillis) Convenience: a single constant arrival-rate (iterations/second) stage.static LoadProfilelinear(int startVus, int endVus, long durationMillis) Convenience: a single linear VU ramp stage.static LoadProfilestatic LoadProfiledoublepeakRate()The maximum arrival rate any stage requests, used to enforce the rate hard cap up-front.intpeakVus()The maximum VU count any stage requests, used to enforce the VU hard cap up-front.longSum of all stage durations — the total run length.withStages(List<LoadStage> stages) withStages(LoadStage... stages) Methods inherited from class org.mockserver.model.ObjectWithJsonToString
toStringMethods inherited from class org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
equals, fieldsExcludedFromEqualsAndHashCode, hashCode
-
Constructor Details
-
LoadProfile
public LoadProfile()
-
-
Method Details
-
loadProfile
-
of
-
constant
Convenience: a single constant-VU stage. -
linear
Convenience: a single linear VU ramp stage. -
constantRate
Convenience: a single constant arrival-rate (iterations/second) stage. -
getStages
-
withStages
-
withStages
-
addStage
-
totalDurationMillis
public long totalDurationMillis()Sum of all stage durations — the total run length. -
peakVus
public int peakVus()The maximum VU count any stage requests, used to enforce the VU hard cap up-front. -
peakRate
public double peakRate()The maximum arrival rate any stage requests, used to enforce the rate hard cap up-front.
-