Crate balter

source ·
Expand description

§Balter

Balter, A Load TestER, is a load/stress testing framework designed to be flexible, efficient, and simple to use. Balter aims to minimize the conceptual overhead of load testing, and builds off of Tokio and the async ecosystem.

  • See the Website for an introduction to Balter.
  • See the Guide for a guide on how to get started.

§Example Usage

use balter::prelude::*;
use std::time::Duration;

#[tokio::main]
async fn main() {
    my_scenario()
        .tps(500)
        .error_rate(0.05)
        .latency(Duration::from_millis(20), 0.99)
        .duration(Duration::from_secs(30))
        .await;
}

#[scenario]
async fn my_scenario() {
    my_transaction().await;
}

#[transaction]
async fn my_transaction() -> Result<u32, String> {
    // Some request logic...

    Ok(0)
}

Re-exports§

Modules§

Structs§

Attribute Macros§