pub struct LoadTestConfig {
pub concurrent_users: usize,
pub duration: Duration,
pub target_rps: usize,
pub ramp_up: Duration,
pub timeout: Duration,
}Expand description
Performance test configuration
Fields§
§concurrent_users: usizeNumber of concurrent users/connections
duration: DurationDuration of the test
target_rps: usizeRequests per second target (0 = unlimited)
ramp_up: DurationRamp-up time to reach target concurrency
timeout: DurationRequest timeout
Implementations§
Source§impl LoadTestConfig
impl LoadTestConfig
Sourcepub fn with_concurrent_users(self, users: usize) -> Self
pub fn with_concurrent_users(self, users: usize) -> Self
Set concurrent users
Sourcepub fn with_duration(self, duration: Duration) -> Self
pub fn with_duration(self, duration: Duration) -> Self
Set test duration
Sourcepub fn with_target_rps(self, rps: usize) -> Self
pub fn with_target_rps(self, rps: usize) -> Self
Set target requests per second
Trait Implementations§
Source§impl Clone for LoadTestConfig
impl Clone for LoadTestConfig
Source§fn clone(&self) -> LoadTestConfig
fn clone(&self) -> LoadTestConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LoadTestConfig
impl RefUnwindSafe for LoadTestConfig
impl Send for LoadTestConfig
impl Sync for LoadTestConfig
impl Unpin for LoadTestConfig
impl UnwindSafe for LoadTestConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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