Back to Skills

performance-regression-detection

verified

Track performance benchmarks and detect regressions exceeding 10% threshold. Analyze historical trends and alert on degradation. Calculate regression score (0.00-1.00) for performance health. Integrate with Serena for continuous monitoring. Use when: monitoring performance, detecting regressions, analyzing performance trends, optimizing slow components, validating performance fixes.

View on GitHub

Marketplace

shannon-framework

krzemienski/shannon-framework

Plugin

shannon

Repository

krzemienski/shannon-framework
1stars

skills/performance-regression-detection/SKILL.md

Last Verified

January 21, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/krzemienski/shannon-framework/blob/main/skills/performance-regression-detection/SKILL.md -a claude-code --skill performance-regression-detection

Installation paths:

Claude
.claude/skills/performance-regression-detection/
Powered by add-skill CLI

Instructions

# Performance Regression Detection - Quantified Speed

## Purpose

Establish baseline performance metrics, detect regressions >10%, and analyze historical trends. Calculates regression score (0.00-1.00) showing performance health. Integrates with Serena MCP for continuous alerting and trend visualization.

## When to Use

- Detecting performance regressions before deployment
- Tracking performance improvements over time
- Comparing performance across branches
- Identifying slow components needing optimization
- Setting performance SLAs and monitoring compliance
- Alerting on regressions >10% threshold

## Core Metrics

**Regression Score:**
```
Score = Current / Baseline × 1.0 (capped at 1.00)
- 1.00 = same or better than baseline (green)
- 0.95 = 5% slower (acceptable)
- 0.90 = 10% slower (warning threshold)
- 0.80 = 20% slower (critical)
```

**Benchmark Tracking Example:**
```
Component: API Request Handler
├─ Baseline (main): 45ms
├─ Current (feature): 48ms (6.7% slower) → Score: 0.97
├─ Threshold: >50ms regression
├─ Trend: Stable (+0.1% vs last week)
└─ Status: ✅ Pass (within tolerance)

Component: Database Query
├─ Baseline: 120ms
├─ Current: 132ms (10% slower) → Score: 0.90
├─ Trend: +4% slower over 2 weeks (regressing)
└─ Status: ⚠️ Warning (at threshold, monitor)
```

## Workflow

### Phase 1: Baseline Establishment
1. **Establish baseline**: Benchmark main branch performance
2. **Sample size**: Run ≥10 iterations for stability
3. **Record stats**: Store mean, std dev, min, max
4. **Push to Serena**: Create historical baseline

### Phase 2: Continuous Monitoring
1. **Run benchmarks**: On each commit/PR
2. **Compare to baseline**: Calculate regression percentage
3. **Calculate score**: 0.00-1.00 metric
4. **Alert if >10%**: Trigger warning/critical notifications
5. **Push to Serena**: Send metrics for tracking

**Serena Push Format:**
```json
{
  "metric_type": "performance_regression",
  "project": "task-app",
  "component": "api_handler",
  "baseline_ms":

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
3619 chars