Package org.mockserver.load
Class LoadPacing
java.lang.Object
org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
org.mockserver.model.ObjectWithJsonToString
org.mockserver.load.LoadPacing
Adaptive iteration pacing (think-time) for a
LoadScenario: a target per-virtual-user
iteration cycle time. After a closed-model VU finishes one pass through the steps, the
orchestrator waits whatever remains of the target cycle before launching that VU's next iteration;
if the iteration's work overran the cycle, the next iteration starts immediately (no wait). This
smooths a closed-model VU loop toward a target per-VU iteration rate (Locust
constant_pacing/constant_throughput, Gatling pace).
Scope: pacing governs only the closed-model VU loop (looping iterations). One-shot
open-model RATE iterations ignore pacing — their arrival rate already governs the spacing between
starts. Pacing composes with (it does not replace) per-step thinkTime: thinkTime adds intra-iteration pauses between steps; pacing targets the whole
iteration cycle and only delays the start of the NEXT iteration. Pacing never alters in-flight
latency measurement (the coordinated-omission-corrected sample is unchanged) — it only changes
when the next iteration launches.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumHow the target iteration cycle is derived fromvalue. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LoadPacingconstantPacing(double cycleMillis) Convenience: a constant-pacing target cycle in milliseconds.static LoadPacingconstantThroughput(double iterationsPerSecond) Convenience: a constant-throughput target ofiterationsPerSecondper VU.doubleThe target iteration cycle in milliseconds derived frommodeandvalue, or0when there is no pacing (LoadPacing.Mode.NONE, a null mode, or a non-positive value).getMode()doublegetValue()static LoadPacingwithMode(LoadPacing.Mode mode) withValue(double value) Methods inherited from class org.mockserver.model.ObjectWithJsonToString
toStringMethods inherited from class org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
equals, fieldsExcludedFromEqualsAndHashCode, hashCode
-
Constructor Details
-
LoadPacing
public LoadPacing()
-
-
Method Details
-
loadPacing
-
constantPacing
Convenience: a constant-pacing target cycle in milliseconds. -
constantThroughput
Convenience: a constant-throughput target ofiterationsPerSecondper VU. -
getMode
-
withMode
-
getValue
public double getValue() -
withValue
-
cycleMillis
public double cycleMillis()The target iteration cycle in milliseconds derived frommodeandvalue, or0when there is no pacing (LoadPacing.Mode.NONE, a null mode, or a non-positive value).LoadPacing.Mode.CONSTANT_PACINGreturnsvalue;LoadPacing.Mode.CONSTANT_THROUGHPUTreturns1000 / value.
-