lot 0.3.1

Rust Load Testing Library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::time::Duration;

use anyhow::Result;
use lot::Executor;

#[tokio::main(flavor = "current_thread")]
async fn main() {
    let mut executor = Executor::new();
    executor.add_stage(0, 100, Duration::from_secs(10));
    executor.add_stage(100, 100, Duration::from_secs(10));
    executor.add_stage(100, 0, Duration::from_secs(10));
    executor.run(my_scenario).await;
}

async fn my_scenario() -> Result<()> {
    // Add your load test logic here
    Ok(())
}