Ultra-fast HTTP load tester written in C with hand-optimized Assembly.
| Feature | Description |
|---|---|
| 🚀 Extreme Performance | Raw POSIX sockets + pthreads |
| 🔧 Hand-Written ASM | ARM64 NEON & x86_64 SSE optimized |
| 📦 Tiny Binary | ~52 KB stripped |
| 🛡️ HTTPS Support | OpenSSL 3 integration |
| 📊 Rich Stats | P50, P95, P99 latencies + status codes |
| 🖥️ Interactive Dashboard | Navigate test history with arrow keys |
| 📋 Test Profiles | Smoke, stress, and soak presets |
| 📉 Regression Testing | Before/After comparison with tags |
| 🛡️ Perf Gates | Build-breaking regression thresholds |
# 1. Clone the repository
git clone https://github.com/HiteshGorana/mach.git
cd mach
# 2. Run the installation script
# For macOS/Linux:
sh scripts/install.sh
# For Windows (PowerShell):
.\scripts\install.ps1Download pre-built binaries from Releases
# Simple test
mach http://localhost:8080
# 1000 requests with 50 concurrent workers
mach -n 1000 -c 50 http://example.com
# 5-minute soak test
mach -d 5m -c 20 http://api.example.com
# Stress test profile
mach --profile stress http://example.commach -m POST \
-h "Content-Type: application/json" \
-b '{"name": "test", "value": 123}' \
https://api.example.com/v1/datamach -h "Authorization: Bearer YOUR_TOKEN" \
https://api.example.com/secure# 500 workers, 10k requests, skip TLS verification
mach -n 10000 -c 500 --insecure https://stage.api.com# Limit to 50 requests per second
mach -r 50 -d 30s https://api.example.comTrack performance improvements or regressions across code changes.
# 1. Capture baseline (before optimization)
mach --tag perf-fix --before -n 1000 http://api.com
# 2. Capture target (after optimization)
mach --tag perf-fix --after -n 1000 http://api.com
# 3. View comparison table
mach --tag perf-fix --resultAutomatically fail CI/CD pipelines if performance regresses beyond a threshold.
# Fail if avg latency regresses by more than 5%
mach --tag release-1.1 --after --threshold 5 -n 1000 http://api.comCreate a urls.txt:
https://example.com/page1
https://example.com/page2
https://example.com/api/v1
Run:
mach -n 1000 -c 20 urls.txt⚡ Mach
Usage: mach [command] [options] <url>
Commands:
attack Full-featured load test
dashboard View historical test runs
history Manage test history (clear, list)
examples Show usage examples
version Show version information
Options:
-n INT Total requests (default 100)
-d STR Run duration (e.g., 30s, 1m, 5m)
-c INT Concurrent workers (default 10)
-r INT Aggregate requests-per-second limit
-p STR Test profile (smoke, stress, soak)
-m STR HTTP method (default GET)
-h STR Add header (e.g., "Authorization:Bearer token")
-b STR Request body
--insecure Skip TLS verification
--tag STR Tag name for comparison
--before Set as baseline for tag
--after Set as target for tag comparison
--result Show comparison result for tag
--threshold FLOAT Max allowed regression %
| Profile | Requests | Concurrency | Use Case |
|---|---|---|---|
smoke |
10 | 2 | Quick sanity check |
stress |
10,000 | 100 | High load testing |
soak |
Duration | 50 | Long-running stability |
# Clone
git clone https://github.com/HiteshGorana/mach.git
cd mach
# Build (auto-detects platform)
make
# Debug build with symbols
make debug
# Address/undefined behavior sanitizer build
make asan
# Run
./mach http://example.comRequirements:
- GCC or Clang
- OpenSSL 3 (
brew install openssl@3on macOS) - Make
Critical hot paths use hand-written Assembly for maximum performance:
| Function | ARM64 (Apple Silicon) | x86_64 (Intel/AMD) |
|---|---|---|
fast_sum |
NEON fadd |
SSE2 addpd |
fast_min |
NEON fmin |
SSE2 minpd |
fast_max |
NEON fmax |
SSE2 maxpd |
fast_parse_status |
Optimized loop | Optimized loop |
fast_duration_ms |
FP math | FP math |
Mach runs natively on:
- ✅ macOS (ARM64 Apple Silicon & Intel x86_64)
- ✅ Linux (x86_64)
- ✅ Windows (x86_64 via MinGW)
MIT © Hitesh Gorana