pub struct K6ScriptGenerator { /* private fields */ }Expand description
Generate k6 load test script
Implementations§
Source§impl K6ScriptGenerator
impl K6ScriptGenerator
Sourcepub fn new(config: K6Config, templates: Vec<RequestTemplate>) -> Self
pub fn new(config: K6Config, templates: Vec<RequestTemplate>) -> Self
Create a new k6 script generator
Sourcepub fn validate_script(script: &str) -> Vec<String>
pub fn validate_script(script: &str) -> Vec<String>
Validate the generated k6 script for common issues
Checks for:
- Invalid metric names (contains dots or special characters)
- Invalid JavaScript variable names
- Missing required k6 imports
Returns a list of validation errors, empty if all checks pass.
Auto Trait Implementations§
impl Freeze for K6ScriptGenerator
impl RefUnwindSafe for K6ScriptGenerator
impl Send for K6ScriptGenerator
impl Sync for K6ScriptGenerator
impl Unpin for K6ScriptGenerator
impl UnwindSafe for K6ScriptGenerator
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more