Skip to content

Aziz-AXG/API-Stress-Testing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ API Stress Testing Tool

A beautiful, colorful CLI tool for stress testing your APIs. Built with Bun and autocannon - no external installations required!

Installation

bun install

Usage

# Basic usage (uses defaults)
bun start

# Test a specific URL
bun start http://localhost:8080

# Full customization
bun start --url http://api.example.com --connections 50 --duration 30

# Short flags
bun start -u http://localhost:3000 -c 100 -d 60

Options

Flag Short Description Default
--url -u Target URL to test http://127.0.0.1:3000
--connections -c Number of concurrent connections 10
--duration -d Test duration in seconds 10
--pipelining -p Pipelined requests per connection 1
--timeout -t Request timeout in seconds 10
--rate -r Max requests per second 0 (no limit)
--help -h Show help message -

Examples

# Quick test with default settings
bun start

# Test with 50 concurrent connections for 30 seconds
bun start http://myapi.com -c 50 -d 30

# Heavy load test
bun start --url http://localhost:3000 --connections 200 --duration 60 --pipelining 10

# Rate limited test (max 1000 requests per second)
bun start http://localhost:3000 --rate 1000

# Simulate realistic traffic (500 req/s for 60 seconds)
bun start -u http://api.example.com -r 500 -d 60

# Show help
bun start --help

Output

The tool provides:

  • πŸ“Š Test Results - Total requests, throughput, requests/sec
  • ⏱️ Latency Stats - Percentiles (2.5%, 50%, 97.5%, 99%), average, max
  • πŸ“ˆ Request Statistics - Min, max, avg, standard deviation
  • ⚠️ Error Tracking - Timeouts, errors, HTTP status codes
  • πŸ† Performance Grade - A+ to F based on latency & error rate
  • πŸ’‘ Quick Insights - Human-readable recommendations

About

πŸš€ Beautiful CLI tool for API stress testing. Built with Bun & Autocannon.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors