devpulse-cli
v1.4.1
Published
> A lightweight CLI for benchmarking API performance in seconds — no dashboards, no setup, just results.
Readme
⚡ DevPulse
A lightweight CLI for benchmarking API performance in seconds — no dashboards, no setup, just results.
🚀 Why DevPulse?
Benchmarking shouldn’t require spinning up Grafana, JMeter, or writing custom scripts. DevPulse is a simple, developer-friendly CLI focused on real-world performance metrics like:
- Average response time
- p95 & p99 latency
- Min & max duration
- Error rates
- JSON & Markdown report export
Perfect for:
- Local testing
- CI comparison
- Performance tuning
- Debugging API regressions
🧰 Installation
Global Installation
npm install -g devpulse-cli@latestDirect Execution
devpulse run https://api.example.com -c 10 -n 100🚀 Usage
Basic Benchmark
devpulse run https://api.example.comWith Custom Concurrency and Request Count
devpulse run https://api.example.com -c 20 -n 500Export Results
# Export to JSON
devpulse run https://api.example.com --json results.json
# Export to Markdown
devpulse run https://api.example.com --md report.md
# Export to both formats
devpulse run https://api.example.com --json results.json --md report.md🛠️ Commands
run
Run a benchmark against a specific endpoint.
Arguments:
url: API endpoint to benchmark
Options:
-c, --concurrency <number>: Number of concurrent requests (default: 10)-n, --requests <number>: Total number of requests (default: 100)--json <path>: Export results to JSON file--md <path>: Export results to Markdown file
📊 Example Output
🔍 Benchmarking https://api.example.com ...
🏎 Running 100 requests with concurrency 10
✔ Completed: 100
✖ Failed: 0
⏱ Avg: 125.33ms
📉 Min: 98.42ms
📈 Max: 210.87ms
🎯 p95: 187.23ms
🎯 p99: 201.45ms📁 Example JSON Export
{
"completed": 100,
"failed": 0,
"metrics": {
"min": 98.42,
"max": 210.87,
"avg": 125.33,
"p95": 187.23,
"p99": 201.45
}
}📝 Example Markdown Export
# DevPulse Benchmark Report
| Metric | Value |
| ----------- | --------- |
| ✔ Completed | 100 |
| ✖ Failed | 0 |
| ⏱ Avg | 125.33 ms |
| 📉 Min | 98.42 ms |
| 📈 Max | 210.87 ms |
| 🎯 p95 | 187.23 ms |
| 🎯 p99 | 201.45 ms |
Generated by **DevPulse** 🔁🛠️ Development Setup
# Clone the repository
git clone https://github.com/mo2men-5aled/devpulse
cd devpulse
# Install dependencies
npm install
# Build the project
npm run build
# Run development version
npm run dev run https://api.example.com -c 5 -n 20