https://github.com/droxer/wrk-runner
https://github.com/droxer/wrk-runner
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/droxer/wrk-runner
- Owner: droxer
- License: mit
- Created: 2025-08-06T10:46:19.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-06T12:44:03.000Z (11 months ago)
- Last Synced: 2025-08-06T13:07:39.450Z (11 months ago)
- Language: Python
- Size: 130 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wrk-runner
Generic performance testing using wrk.
- **Easy CLI**: One-command testing with `wrk-runner test https://httpbin.org/get`
- **JSON/YAML Config**: Structured test definitions with endpoints and parameters
- **Rich Reports**: Auto-generated markdown reports with metrics and charts
- **Multiple Formats**: JSON, CSV, HTML reports for CI/CD integration
- **Lua Support**: Custom scripts for complex testing scenarios
## Install
```bash
pip install wrk-runner
```
## Usage
### CLI Commands
```bash
wrk-runner [COMMAND] [OPTIONS]
Commands:
test [URL] Quick test with URL or config file test
init-config Generate sample configuration
validate FILE Validate configuration file
visualize Scan and visualize results
```
### Quick Test
```bash
# Basic quick test
wrk-runner test https://httpbin.org/get
# With parameters
wrk-runner test https://api.com -d 60 -c 1000 -t 8 -w 5 -o results/
```
### Configuration Test
```bash
# JSON config
wrk-runner test -c config.json
# YAML config
wrk-runner test -c config.yaml
# Custom output
wrk-runner test -c config.json --output custom_results/
# Override config parameters
wrk-runner test -c config.json -d 60 -c 2000
```
### Options
```bash
-d, --duration SECONDS Test duration (default: 30)
-c, --connections NUM Number of connections (default: 1000)
-t, --threads NUM Number of threads (default: 8)
-w, --warmup SECONDS Warmup time (default: 5)
-o, --output DIR Output directory (default: results)
-s, --lua-script FILE Lua script for wrk
-f, --format FORMAT Output format: html, json, md (default: md)
--verbose Enable verbose logging
--help Show help message
```
## Config
```json
{
"duration": 30,
"connections": 1000,
"threads": 8,
"tests": [
{
"name": "api",
"url": "http://localhost:3000/api"
}
]
}
```
## Dev Setup
```bash
git clone https://github.com/droxer/wrk-runner
cd wrk-runner
make install-dev
make check
```
## Make Commands
| Command | Description |
|---------|-------------|
| `make test` | Run tests |
| `make build` | Build package |
| `make publish` | Publish to PyPI |
| `make check` | Run all checks |
| `make all` | Full pipeline |
## Requirements
- Python 3.10+
- wrk (`brew install wrk`)
## License
MIT