Class LoadProfile


public class LoadProfile extends ObjectWithJsonToString
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 Details

    • LoadProfile

      public LoadProfile()
  • Method Details

    • loadProfile

      public static LoadProfile loadProfile()
    • of

      public static LoadProfile of(LoadStage... stages)
    • constant

      public static LoadProfile constant(int vus, long durationMillis)
      Convenience: a single constant-VU stage.
    • linear

      public static LoadProfile linear(int startVus, int endVus, long durationMillis)
      Convenience: a single linear VU ramp stage.
    • constantRate

      public static LoadProfile constantRate(double rate, long durationMillis)
      Convenience: a single constant arrival-rate (iterations/second) stage.
    • getStages

      public List<LoadStage> getStages()
    • withStages

      public LoadProfile withStages(List<LoadStage> stages)
    • withStages

      public LoadProfile withStages(LoadStage... stages)
    • addStage

      public LoadProfile addStage(LoadStage stage)
    • 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.