Skip to content

wcygan/load-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Load Generator


A tool to send load to a server.

This is accomplished by sending as many requests as possible to a server in a given time period.

Warning

You probably don't want to target a host on the internet or use a metered connection with this :)

Installation

cargo install --git https://github.com/wcygan/load-generator

Usage

A tool to load test a server

Usage: ldg [OPTIONS] --url <URL>

Options:
  -u, --url <URL>                  The URL to send requests to
  -c, --connections <CONNECTIONS>  The number of connections to use [default: 8]
  -t, --time <TIME>                The amount of seconds to run the test for. If not specified, the test will run until an interrupt signal is received
  -h, --help                       Print help

Example

In this example we'll target a local server running on port 3000 with 2 connections for 5 seconds.

Running Axum Hello Server locally & aiming this tool at it yields around 1M - 2M QPS.

ldg --url 0.0.0.0:3000 --connections 4 --time 2

On a MacBook Pro M1 Max this is running at approximately 1898470.07 requests per second.

References

Adapted from A Load Test CLI with Async Rust

About

a cli-based network load generator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages