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.
§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§
- runtime
rt
Default Balter Distributed Runtime - Scenario logic and constants
Structs§
- Default Balter distributed runtime. (requires
rt
feature) - Run Statistics for a given Scenario
Attribute Macros§
- scenario
rt
Proc macro to denote a Scenario - Proc macro to denote a Transaction