pub struct LoadStage {
pub stage_type: LoadStageType,
pub duration_millis: u64,
pub curve: Option<RampCurve>,
pub vus: Option<u32>,
pub start_vus: Option<u32>,
pub end_vus: Option<u32>,
pub rate: Option<f64>,
pub start_rate: Option<f64>,
pub end_rate: Option<f64>,
pub max_vus: Option<u32>,
}Expand description
One stage of a LoadProfile: a contiguous slice of the run holding or
ramping a setpoint for duration_millis. Stages run in sequence. Maps to the
LoadStage schema.
Use the constructors LoadStage::vu_hold, LoadStage::vu_ramp,
LoadStage::rate_hold, LoadStage::rate_ramp and LoadStage::pause
rather than building the struct directly so only the relevant fields are set
(and therefore serialized).
Fields§
§stage_type: LoadStageTypeThe kind of stage — VU, RATE or PAUSE.
duration_millis: u64How long this stage runs in milliseconds (> 0).
curve: Option<RampCurve>Ramp shape (ramp stages only); omitted for holds and pauses.
vus: Option<u32>VU hold: the number of virtual users to hold for the stage.
start_vus: Option<u32>VU ramp: virtual users at the start of the ramp.
end_vus: Option<u32>VU ramp: virtual users at the end of the ramp.
rate: Option<f64>RATE hold: arrival rate to hold, in iterations per second.
start_rate: Option<f64>RATE ramp: arrival rate at the start of the ramp, in iterations/second.
end_rate: Option<f64>RATE ramp: arrival rate at the end of the ramp, in iterations/second.
max_vus: Option<u32>RATE stage only: optional cap on the auto-scaling virtual-user pool.
Implementations§
Source§impl LoadStage
impl LoadStage
Sourcepub fn vu_hold(vus: u32, duration_millis: u64) -> Self
pub fn vu_hold(vus: u32, duration_millis: u64) -> Self
A VU stage holding vus virtual users for duration_millis.
Sourcepub fn vu_ramp(
start_vus: u32,
end_vus: u32,
duration_millis: u64,
curve: RampCurve,
) -> Self
pub fn vu_ramp( start_vus: u32, end_vus: u32, duration_millis: u64, curve: RampCurve, ) -> Self
A VU stage ramping from start_vus to end_vus over duration_millis
along curve.
Sourcepub fn rate_hold(rate: f64, duration_millis: u64) -> Self
pub fn rate_hold(rate: f64, duration_millis: u64) -> Self
A RATE stage holding rate iterations/second for duration_millis.
Sourcepub fn rate_ramp(
start_rate: f64,
end_rate: f64,
duration_millis: u64,
curve: RampCurve,
) -> Self
pub fn rate_ramp( start_rate: f64, end_rate: f64, duration_millis: u64, curve: RampCurve, ) -> Self
A RATE stage ramping from start_rate to end_rate iterations/second
over duration_millis along curve.