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§

pub use scenario::Scenario;

Modules§

prelude
runtimert
Default Balter Distributed Runtime
scenario
Scenario logic and constants

Structs§

BalterRuntimert
Default Balter distributed runtime. (requires rt feature)
RunStatistics
Run Statistics for a given Scenario

Enums§

Hint
User provided hints for setting autoscaling parameters.

Attribute Macros§

scenariort
Proc macro to denote a Scenario
transactionrt
Proc macro to denote a Transaction