pub struct LoadStep {
pub request: HttpRequest,
pub think_time: Option<Delay>,
pub captures: Vec<LoadCapture>,
pub weight: Option<f64>,
}Expand description
A single templated request step in a load scenario. Maps to the LoadStep
schema.
Fields§
§request: HttpRequestThe templated request to fire each iteration.
think_time: Option<Delay>Optional inter-step pause (a Delay).
captures: Vec<LoadCapture>Optional cross-step capture rules applied to this step’s response. Each binds an extracted value to a variable name visible to SUBSEQUENT steps in the same iteration.
weight: Option<f64>Relative selection weight, used only when the scenario’s
stepSelection is WEIGHTED. Must be > 0 when WEIGHTED; ignored
under the default SEQUENTIAL mode.
Implementations§
Source§impl LoadStep
impl LoadStep
Sourcepub fn new(request: HttpRequest) -> Self
pub fn new(request: HttpRequest) -> Self
Create a step from a request matcher/template.
Sourcepub fn think_time(self, delay: Delay) -> Self
pub fn think_time(self, delay: Delay) -> Self
Set the inter-step pause.
Sourcepub fn capture(self, capture: LoadCapture) -> Self
pub fn capture(self, capture: LoadCapture) -> Self
Append a cross-step capture rule applied to this step’s response.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LoadStep
impl<'de> Deserialize<'de> for LoadStep
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for LoadStep
Auto Trait Implementations§
impl Freeze for LoadStep
impl RefUnwindSafe for LoadStep
impl Send for LoadStep
impl Sync for LoadStep
impl Unpin for LoadStep
impl UnsafeUnpin for LoadStep
impl UnwindSafe for LoadStep
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more