Package org.mockserver.load
Class LoadShapes
java.lang.Object
org.mockserver.load.LoadShapes
Expands a declarative
LoadShape into the ordinary list of LoadStages the
orchestrator runs. This is the single source of truth for shape → stage expansion; it is pure and
side-effect-free (it only reads the shape and builds stages with the existing LoadStage
builders), so LoadProfile.getStages() can call it lazily and the result is unit-testable
without driving traffic.
Design choices (documented because they are observable in the expansion):
- STAIRS are pure steps — each step is a single constant hold at
start + i*step; there is no inter-step ramp (a flight of stairs is discrete by definition, and pure holds are the simplest faithful expansion). - RATE expansions leave
maxVusunset on every stage, so the globalloadGenerationMaxVirtualUserscap governs the auto-scaled VU pool. A shape does not impose its own (lower) per-stage VU cap — pick the safe option that never silently throttles below the configured global limit. - VU setpoints are integers — VU parameters are rounded to the nearest whole VU when the shape is built into VU stages; RATE parameters stay fractional iterations/second.
-
Method Summary
-
Method Details
-
expand
-