regression-performance
Detect performance regressions by comparing benchmarks across versions with latency, throughput, and statistical significance analysis
What this skill does
# regression-performance
Detect performance regressions by comparing benchmarks across versions, analyzing latency/throughput degradation, and providing statistical significance testing.
## Triggers
Alternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description):
- "latency regression" → performance benchmark comparison
- "p99" / "p95" → percentile-based performance metrics
- "benchmark diff" → performance baseline comparison
## Purpose
This skill detects performance regressions across software versions by:
- Comparing latency metrics (p50, p95, p99) between baseline and current versions
- Detecting throughput regressions (requests/sec, transactions/sec)
- Identifying memory regressions (heap growth, memory leaks)
- Analyzing resource utilization (CPU, disk I/O, network)
- Running benchmark comparisons with statistical significance testing
- Generating performance regression reports with visualizations
## Behavior
When triggered, this skill:
1. **Identifies baseline version**:
- Detect last known good version from git tags
- Load baseline benchmark results
- Extract performance metrics from monitoring
2. **Runs performance benchmarks**:
- Execute load tests using k6, Artillery, or wrk
- Capture latency distributions (p50, p95, p99)
- Measure throughput (req/s, TPS)
- Profile memory usage and heap growth
- Monitor CPU and I/O utilization
3. **Performs statistical comparison**:
- Calculate delta and percentage change
- Apply statistical significance tests (t-test, Mann-Whitney U)
- Determine if degradation exceeds threshold
- Account for variance and noise
4. **Detects regression patterns**:
- Latency spikes at specific percentiles
- Throughput capacity reduction
- Memory leak indicators (growing heap)
- CPU saturation points
- I/O bottlenecks
5. **Generates regression report**:
- Performance comparison tables
- Percentile distribution graphs
- Time-series trend analysis
- Root cause indicators
- Recommendations
6. **Logs regression findings**:
- Create regression register entry
- Tag commits with performance impact
- Alert on threshold violations
## Performance Metrics Model
```
┌─────────────────────┐
│ BASELINE v2.3.0 │
├─────────────────────┤
│ p50: 45ms │
│ p95: 120ms │
│ p99: 180ms │
│ RPS: 2500 │
│ Mem: 256MB │
└─────────────────────┘
│
▼ Compare
┌─────────────────────┐
│ CURRENT v2.4.0 │
├─────────────────────┤
│ p50: 52ms (+15%) │ ⚠️ REGRESSION
│ p95: 145ms (+21%) │ ⚠️ REGRESSION
│ p99: 220ms (+22%) │ ⚠️ REGRESSION
│ RPS: 2100 (-16%) │ ⚠️ REGRESSION
│ Mem: 312MB (+22%) │ ⚠️ REGRESSION
└─────────────────────┘
│
▼
┌─────────────────────┐
│ REGRESSION REPORT │
│ │
│ Type: Latency │
│ Severity: HIGH │
│ Confidence: 99.5% │
│ Root Cause: TBD │
└─────────────────────┘
```
## Metric Categories
### Latency Metrics
| Metric | Description | Threshold | Tool |
|--------|-------------|-----------|------|
| p50 (median) | 50th percentile latency | +10% | k6, Artillery, wrk |
| p95 | 95th percentile latency | +15% | k6, Artillery, wrk |
| p99 | 99th percentile latency | +20% | k6, Artillery, wrk |
| max | Maximum observed latency | +30% | k6, Artillery, wrk |
### Throughput Metrics
| Metric | Description | Threshold | Tool |
|--------|-------------|-----------|------|
| Requests/sec | HTTP requests per second | -10% | k6, wrk, ab |
| Transactions/sec | Business transactions per second | -10% | Custom |
| Bytes/sec | Network throughput | -15% | iperf3, iftop |
| Queries/sec | Database query throughput | -10% | pgbench, sysbench |
### Memory Metrics
| Metric | Description | Threshold | Tool |
|--------|-------------|-----------|------|
| Heap size | JavaScript heap usage | +20% | Node.js heap snapshot |
| RSS | Resident set size | +20% | ps, top |
| Memory growth rate | MB/hour increase | >10 MB/hour | Continuous profiling |
| GC pressure | Garbage collection frequency | +30% | Node.js --trace-gc |
### Resource Metrics
| Metric | Description | Threshold | Tool |
|--------|-------------|-----------|------|
| CPU utilization | Average CPU usage | +20% | mpstat, top |
| Disk I/O wait | I/O wait percentage | +25% | iostat |
| Network bandwidth | Network utilization | +15% | iftop, nethogs |
| File descriptors | Open file handles | +30% | lsof |
## Benchmark Tools Integration
### k6 Load Testing
```javascript
// benchmark.k6.js
import http from 'k6/http';
import { check, sleep } from 'k6';
export let options = {
stages: [
{ duration: '2m', target: 100 }, // Ramp up
{ duration: '5m', target: 100 }, // Steady state
{ duration: '2m', target: 0 }, // Ramp down
],
thresholds: {
'http_req_duration': ['p(50)<100', 'p(95)<200', 'p(99)<300'],
'http_req_failed': ['rate<0.01'],
},
};
export default function () {
const res = http.get('https://api.example.com/endpoint');
check(res, {
'status is 200': (r) => r.status === 200,
'response time < 200ms': (r) => r.timings.duration < 200,
});
sleep(1);
}
```
**Running comparison**:
```bash
# Baseline
k6 run --out json=baseline-results.json benchmark.k6.js
# Current version
k6 run --out json=current-results.json benchmark.k6.js
# Compare
./compare-k6-results.sh baseline-results.json current-results.json
```
### Artillery Load Testing
```yaml
# artillery-config.yml
config:
target: 'https://api.example.com'
phases:
- duration: 120
arrivalRate: 10
rampTo: 50
- duration: 300
arrivalRate: 50
- duration: 120
arrivalRate: 50
rampTo: 0
plugins:
metrics-by-endpoint:
stripQueryString: true
scenarios:
- name: "API Performance Test"
flow:
- get:
url: "/api/users"
- get:
url: "/api/products"
- post:
url: "/api/orders"
json:
product_id: 123
quantity: 2
```
**Running comparison**:
```bash
# Baseline
artillery run --output baseline.json artillery-config.yml
# Current
artillery run --output current.json artillery-config.yml
# Compare
artillery report baseline.json --output baseline-report.html
artillery report current.json --output current-report.html
./compare-artillery-results.sh baseline.json current.json
```
### wrk HTTP Benchmarking
```bash
# Simple throughput test
wrk_benchmark() {
local version=$1
local output_file=$2
wrk -t12 -c400 -d30s \
--latency \
--timeout 10s \
https://api.example.com/endpoint \
> "$output_file"
}
# Baseline
wrk_benchmark "v2.3.0" "wrk-baseline.txt"
# Current
wrk_benchmark "v2.4.0" "wrk-current.txt"
# Compare
./parse-wrk-results.sh wrk-baseline.txt wrk-current.txt
```
### Apache Bench (ab)
```bash
# Quick regression check
ab_compare() {
local baseline_version=$1
local current_version=$2
echo "=== Baseline ${baseline_version} ==="
ab -n 10000 -c 100 https://api.example.com/ > ab-baseline.txt
echo "=== Current ${current_version} ==="
ab -n 10000 -c 100 https://api.example.com/ > ab-current.txt
# Extract key metrics
echo "Comparison:"
echo "Baseline RPS: $(grep 'Requests per second' ab-baseline.txt | awk '{print $4}')"
echo "Current RPS: $(grep 'Requests per second' ab-current.txt | awk '{print $4}')"
}
```
### Hyperfine (CLI tool benchmarking)
```bash
# For CLI tool performance
hyperfine \
--warmup 3 \
--export-json comparison.json \
'git checkout v2.3.0 && npm run build && npm test' \
'git checkout v2.4.0 && npm run build && npm test'
```
## Statistical Significance Testing
### T-Test for Mean Comparison
```typescript
function detectLatencyRegression(
baseline: number[],
current: number[]
): RegressionAnalysis {
const baselineMean = mean(baseline);
const currentMean = mean(current);
const delta = currentMean - baselineMean;
coRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.