Package org.mockserver.load
Class LoadScenario
java.lang.Object
org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
org.mockserver.model.ObjectWithJsonToString
org.mockserver.load.LoadScenario
An API-driven load scenario: an ordered list of templated request
LoadSteps
driven at a target concurrency described by a LoadProfile, with optional
per-iteration data variation via the scenario's HttpTemplate.TemplateType.
Modelled on VerificationSequence (an ordered list of
request steps) but oriented at producing traffic rather than asserting over it.
It is a pure SLI producer: it records latency/error samples (into the metrics histograms
and the SLO sample store) but contains no verdict logic — the SLO verify feature consumes
those samples.
Off by default; PUT /mockserver/loadScenario returns 403 unless
loadGenerationEnabled is set.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionScenario-level custom labels (may be null/empty).getName()longThe start delay in milliseconds applied after a start trigger before this scenario's iterations begin (default0).getSteps()static LoadScenariostatic LoadScenarioloadScenario(String name) withLabels(Map<String, String> labels) withMaxRequests(Integer maxRequests) withProfile(LoadProfile profile) withStartDelayMillis(long startDelayMillis) withTemplateType(HttpTemplate.TemplateType templateType) Methods inherited from class org.mockserver.model.ObjectWithJsonToString
toStringMethods inherited from class org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
equals, fieldsExcludedFromEqualsAndHashCode, hashCode
-
Constructor Details
-
LoadScenario
public LoadScenario()
-
-
Method Details
-
loadScenario
-
loadScenario
-
getName
-
withName
-
getSteps
-
withSteps
-
withSteps
-
getProfile
-
withProfile
-
getTemplateType
-
withTemplateType
-
getMaxRequests
-
withMaxRequests
-
getStartDelayMillis
public long getStartDelayMillis()The start delay in milliseconds applied after a start trigger before this scenario's iterations begin (default0). SeestartDelayMillis. -
withStartDelayMillis
-
getLabels
Scenario-level custom labels (may be null/empty). Seelabels. -
withLabels
-
withLabel
-