je_load_density.utils.load_shapes.shapes

LoadTestShape factories.

Three reusable shapes that subclass locust.LoadTestShape and schedule (user_count, spawn_rate) per second:

  • StagesShape — list of dict stages {"duration": s, "users": N, "spawn_rate": R}.

  • SpikeShape — baseline → spike → baseline.

  • SoakShape — ramp up, hold, ramp down.

locust is imported lazily so the shapes can be exercised in unit tests without spinning up an environment.

Functions

SoakShape(**config)

SpikeShape(**config)

StagesShape(stages)

build_load_shape(name[, config])

Construct one of the built-in shapes by name.

je_load_density.utils.load_shapes.shapes.SoakShape(**config)
je_load_density.utils.load_shapes.shapes.SpikeShape(**config)
je_load_density.utils.load_shapes.shapes.StagesShape(stages: List[Dict[str, Any]])
je_load_density.utils.load_shapes.shapes.build_load_shape(name: str, config: Dict[str, Any] | None = None)

Construct one of the built-in shapes by name. Returns the Locust LoadTestShape subclass, ready to pass to Environment(shape_class=…).