Coder Social home page Coder Social logo

declark1 / balter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from balterloadtesting/balter

0.0 0.0 0.0 618 KB

Load testing framework in Rust

Home Page: https://balterloadtesting.com/balter

License: MIT License

Rust 97.98% Nix 1.53% Just 0.48%

balter's Introduction

Balter

Linux build status Crates.io

Balter, short for 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.
  • See the Developer Notes section for tips on modifying Balter.

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)
}

Developer Notes

The Balter repository is set up to be easy to get started with development. It uses Nix to facilitate the environment setup via shell.nix (if you haven't yet drank the Nixaide, open up that file and it will give you an idea of the programs you'll want). Otherwise, Balter works just fine with all the default cargo commands.

The integration tests can be a bit finicky. To run the integration tests, use just integration (or if you don't have just installed, cargo test --release --features integration). In order to easily debug these tests (which oftentimes rely on controller logic operating correctly), it can be useful to have graphs. You can find Grafana dashboards for each test in dashboards/, and if you have Prometheus running (using the prometheus.yml at the root) and Grafana running (importing the dashboards) you should be set.

balter's People

Contributors

byronwasti avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.