Skip to content

feat: add performance regression detection system#118

Open
marcus wants to merge 2 commits intomainfrom
feat/perf-regression-detector
Open

feat: add performance regression detection system#118
marcus wants to merge 2 commits intomainfrom
feat/perf-regression-detector

Conversation

@marcus
Copy link
Owner

@marcus marcus commented Feb 10, 2026

Summary

Implement automated performance regression detection for Sidecar. The system captures baseline benchmarks from the existing benchmark suite (ClaudeCode and Codex adapters), stores metrics, and detects when changes cause >10% performance degradation.

Key features:

  • Baseline metrics captured from benchmark suite
  • Regression detector tool that compares performance against baseline
  • CI integration for automated regression testing on PRs
  • GitHub Actions workflow to run benchmarks and comment results
  • Comprehensive documentation on targets and workflow

Changes

New Files

  • .benchmarks/baseline.json - Performance baseline metrics
  • scripts/perf-regressor.go - Regression detection tool (507 LOC)
  • scripts/benchmark-baseline.sh - Baseline capture script
  • scripts/ci-benchmark-check.sh - CI integration script
  • scripts/BENCHMARK_README.md - Scripts documentation
  • REGRESSION.md - System documentation
  • .github/workflows/benchmark.yml - GitHub Actions workflow

Modified Files

  • .gitignore - Exclude benchmark artifacts

Performance Targets

ClaudeCode Adapter:

  • FullParse_1MB: < 50ms
  • FullParse_10MB: < 500ms
  • CacheHit: < 1ms
  • IncrementalParse: < 10ms

Codex Adapter:

  • SessionFiles: < 100ms
  • SessionMetadata: < 10ms
  • Sessions: < 50ms (for 10 files)

Test Plan

  • All existing tests pass
  • Regression detector builds and runs
  • Baseline metrics properly formatted
  • Scripts are executable and functional
  • CI workflow syntax validated
  • Documentation is comprehensive

🤖 Generated with Claude Code

marcus and others added 2 commits February 9, 2026 22:02
- cmd/sidecar/main.go: Handle os.Unsetenv error with blank identifier
- internal/adapter/amp/adapter_test.go: Handle os.MkdirAll errors in test helpers
- internal/adapter/kiro/kiro_test.go: Handle os.MkdirAll and os.WriteFile errors
- internal/plugins/workspace/diff_test.go: Handle exec.Cmd.Run and os.WriteFile errors
- internal/plugins/conversations/view_content.go: Fix ineffassign by using var declaration

All 24 linting errors (23 errcheck + 1 ineffassign) now resolved.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Implement automated performance regression detection with:
- Baseline benchmark metrics (.benchmarks/baseline.json)
- Regression detector tool (perf-regressor.go) that compares current benchmarks
  against baseline and detects >10% performance degradation
- CI integration script (ci-benchmark-check.sh) for automated regression testing
- GitHub Actions workflow for running benchmarks on PRs
- Comprehensive documentation (REGRESSION.md) on performance targets and workflow

Performance thresholds:
- ClaudeCode adapter: 1MB parse <50ms, 10MB parse <500ms, cache <1ms
- Codex adapter: session walk <100ms, metadata parse <10ms

The system captures baseline metrics from existing benchmarks, stores metrics,
and fails builds if critical performance thresholds are exceeded. PR checks
automatically compare against main branch baseline and comment with results.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant