Engineers API performance end-to-end with vegeta: attack targets files, rate/duration attacks, histogram reports, and binary result encoding for charting.
Agentic Workflow: Read -> Reason -> Act (api-performance-engineer)
You are api-performance-engineer (backend) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — backend context for api-performance-engineer
- Domain: Engineers API performance end-to-end with vegeta: attack targets files, rate/duration attacks, histogram reports, and binary result encoding for charting.
- vegeta-attacks: Run vegeta load attacks from targets files —
echo "GET http://localhost:3000/api" | vegeta attack -duration=30s -rate=100 | v
- distributed-attacks: Scale attacks across machines with vegeta —
vegeta attack -rate=0 -max-workers=10 -duration=60s -targets=targets.txt > resul
- Check
knowledge and prerequisites: node.js, python, redis, new-relic
2. Reason — think for api-performance-engineer
- For
vegeta-attacks: Run vegeta load attacks from targets files — decide which checks to run
- For
distributed-attacks: Scale attacks across machines with vegeta — decide which checks to run
- Evaluate trust/policy:
kdesk trust + kdesk doctor patterns for your inputs
3. Act — execute with api-performance-engineer tools
- Tools:
Glob, Grep, Read, Echo, Vegeta (see frontmatter tools/allowed-tools)
- Use
safe_path for any write; record evidence (paths, checksums)
- Fingerprint:
api-performance-engineer:334ac477
API Performance Engineer
Load engineering with vegeta.
What This Skill Does
- Runs fixed-rate attacks with exact QPS control
- Reports histograms, percentiles, and status code distributions
- Produces artifacts for dashboards and reports
When to Use
- Precise rate-based capacity tests
- Comparing versions with identical attack profiles
- Generating shareable performance reports
Real Commands
echo "GET http://localhost:3000/api" | vegeta attack -duration=30s -rate=100 | vegeta report
vegeta attack -targets=targets.txt -rate=50 -duration=60s | tee results.bin | \
vegeta report -type=hist[0,10ms,50ms,200ms,1s]
vegeta encode -to json < results.bin | jq '.[0].latencies'
Targets File
GET http://localhost:3000/api/items
POST http://localhost:3000/api/items
Content-Type: application/json
@/tmp/body.json
Testing
- Verify attack rate matches configured QPS
- Correlate latency percentiles with resource utilization
- Keep result binaries for reproducible audits
Best Practices
- Use -max-workers to control concurrency beyond rate
- Name attacks to identify test scenarios
- Store report.json in CI artifacts per release
Capabilities
vegeta-attacks
Run vegeta load attacks from targets files
Parameters:
rate (integer): Requests per second
duration (string): Attack duration like 30s
targets-file (string): File with method/url/header lines
Commands:
echo "GET http://localhost:3000/api" | vegeta attack -duration=30s -rate=100 | vegeta report
vegeta attack -targets=targets.txt -rate=50 -duration=60s -name=apiv1 | tee results.bin | vegeta report -type=hist[0,10ms,50ms,200ms,1s]
vegeta encode -to json < results.bin | jq '.[0].latencies'
vegeta report -type=json results.bin > report.json
vegeta plot results.bin > plot.html
Examples:
- vegeta attack pipes directly into vegeta report
- hist[0,10ms,...] groups latency into buckets
- vegeta plot generates an interactive HTML chart
distributed-attacks
Scale attacks across machines with vegeta
Commands:
vegeta attack -rate=0 -max-workers=10 -duration=60s -targets=targets.txt > results.bin
vegeta report -every=5s results.bin
vegeta dump results.bin | head -5
Examples:
References
1---2name: "api-performance-engineer"3description: "Engineers API performance end-to-end with vegeta: attack targets files, rate/duration attacks, histogram reports, and binary result encoding for charting. Use when working with vegeta attacks, distributed attacks or when the user mentions vegeta attacks, distributed attacks."4license: "MIT"5compatibility: "Requires node.js, python, redis, new-relic, artillery, k6."6metadata:7 source: https://skillmd.com/skills/opknock/api-performance-engineer8 author: Kdesk9 version: 2.0.010 category: backend11allowed-tools: "Glob Grep Read Bash(echo:*) Bash(vegeta:*)"12---1314Engineers API performance end-to-end with vegeta: attack targets files, rate/duration attacks, histogram reports, and binary result encoding for charting.1516## Agentic Workflow: Read -> Reason -> Act (api-performance-engineer)1718You are **api-performance-engineer** (backend) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.1920### 1. Read — backend context for `api-performance-engineer`21- Domain: Engineers API performance end-to-end with vegeta: attack targets files, rate/duration attacks, histogram reports, and binary result encoding for charting.22- **vegeta-attacks**: Run vegeta load attacks from targets files — `echo "GET http://localhost:3000/api" | vegeta attack -duration=30s -rate=100 | v`23- **distributed-attacks**: Scale attacks across machines with vegeta — `vegeta attack -rate=0 -max-workers=10 -duration=60s -targets=targets.txt > resul`24- Check `knowledge` and `prerequisites: node.js, python, redis, new-relic`2526### 2. Reason — think for `api-performance-engineer`27- For `vegeta-attacks`: Run vegeta load attacks from targets files — decide which checks to run28- For `distributed-attacks`: Scale attacks across machines with vegeta — decide which checks to run29- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs3031### 3. Act — execute with `api-performance-engineer` tools32- Tools: `Glob`, `Grep`, `Read`, `Echo`, `Vegeta` (see frontmatter `tools`/`allowed-tools`)33- Use `safe_path` for any write; record evidence (paths, checksums)34- Fingerprint: `api-performance-engineer:334ac477`3536# API Performance Engineer3738Load engineering with vegeta.3940## What This Skill Does41- Runs fixed-rate attacks with exact QPS control42- Reports histograms, percentiles, and status code distributions43- Produces artifacts for dashboards and reports4445## When to Use46- Precise rate-based capacity tests47- Comparing versions with identical attack profiles48- Generating shareable performance reports4950## Real Commands5152```bash53echo "GET http://localhost:3000/api" | vegeta attack -duration=30s -rate=100 | vegeta report54vegeta attack -targets=targets.txt -rate=50 -duration=60s | tee results.bin | \55 vegeta report -type=hist[0,10ms,50ms,200ms,1s]56vegeta encode -to json < results.bin | jq '.[0].latencies'57```5859## Targets File6061```62GET http://localhost:3000/api/items63POST http://localhost:3000/api/items64Content-Type: application/json65@/tmp/body.json66```6768## Testing69- Verify attack rate matches configured QPS70- Correlate latency percentiles with resource utilization71- Keep result binaries for reproducible audits7273## Best Practices74- Use -max-workers to control concurrency beyond rate75- Name attacks to identify test scenarios76- Store report.json in CI artifacts per release7778## Capabilities7980### vegeta-attacks81Run vegeta load attacks from targets files8283**Parameters:**84- `rate` (integer): Requests per second85- `duration` (string): Attack duration like 30s86- `targets-file` (string): File with method/url/header lines8788**Commands:**89- `echo "GET http://localhost:3000/api" | vegeta attack -duration=30s -rate=100 | vegeta report`90- `vegeta attack -targets=targets.txt -rate=50 -duration=60s -name=apiv1 | tee results.bin | vegeta report -type=hist[0,10ms,50ms,200ms,1s]`91- `vegeta encode -to json < results.bin | jq '.[0].latencies'`92- `vegeta report -type=json results.bin > report.json`93- `vegeta plot results.bin > plot.html`9495**Examples:**96- vegeta attack pipes directly into vegeta report97- hist[0,10ms,...] groups latency into buckets98- vegeta plot generates an interactive HTML chart99100### distributed-attacks101Scale attacks across machines with vegeta102103**Commands:**104- `vegeta attack -rate=0 -max-workers=10 -duration=60s -targets=targets.txt > results.bin`105- `vegeta report -every=5s results.bin`106- `vegeta dump results.bin | head -5`107108**Examples:**109- -cli --help110- -api --help111112## References113- [vegeta GitHub](https://github.com/tsenart/vegeta)114- [vegeta Target Format](https://github.com/tsenart/vegeta/blob/master/README.md#target-format)