pub struct LoadTester { /* private fields */ }Expand description
Load tester for daemons.
Implementations§
Source§impl LoadTester
impl LoadTester
Sourcepub const fn new(config: LoadTestConfig) -> Self
pub const fn new(config: LoadTestConfig) -> Self
Creates a new load tester.
Sourcepub fn with_handler(self, handler: RequestHandler) -> Self
pub fn with_handler(self, handler: RequestHandler) -> Self
Sets a custom request handler for the load test.
The handler receives (user_id, request_id) and returns true for success.
Sourcepub async fn run(&self) -> Result<LoadTestReport>
pub async fn run(&self) -> Result<LoadTestReport>
Runs the load test with concurrent workers.
§Load Test Phases (Toyota Way: Heijunka)
- Ramp-up: Gradually spawn workers to avoid thundering herd
- Steady-state: All workers active, collecting metrics
- Cool-down: Workers complete, aggregate results
§Errors
Returns an error if the test infrastructure fails.
Sourcepub const fn config(&self) -> &LoadTestConfig
pub const fn config(&self) -> &LoadTestConfig
Returns the test config.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LoadTester
impl !RefUnwindSafe for LoadTester
impl Send for LoadTester
impl Sync for LoadTester
impl Unpin for LoadTester
impl !UnwindSafe for LoadTester
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