perf-regression

Automate performance regression testing for Rust projects using Cargo benchmarks.

2|Updated Jan 24, 2026
One-click install
npx skills add https://github.com/ahrav/scratch-scanner-rs --skill perf-regression
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: perf-regression
Source: https://github.com/ahrav/scratch-scanner-rs/tree/main/.claude/skills/perf-regression
Command: npx skills add https://github.com/ahrav/scratch-scanner-rs --skill perf-regression

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill prevents performance regressions in critical code paths by establishing a baseline and comparing subsequent changes against it.

Core Features & Use Cases

  • Baseline Measurement: Captures performance metrics for key operations before code changes.
  • Regression Detection: Compares post-change performance against the established baseline to identify degradations.
  • Acceptance Criteria: Defines clear thresholds for acceptable performance changes.
  • Use Case: Before merging a change that modifies the core scanning engine, run this workflow to ensure the new code isn't significantly slower than the existing version.

Quick Start

Run the perf-regression skill to test performance changes in the hot paths.

Frequently Asked Questions about perf-regression

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate performance regression testing for Rust code paths?

Prevent performance degradation in Rust by capturing baseline metrics with Cargo benchmarks and comparing subsequent code changes against them. The workflow enforces acceptance criteria for performance deltas across specified repositories to ensure critical code paths remain fast.

What is the best way to detect performance regressions in a Rust project before merging?

Detect performance regressions by running a benchmarking workflow that quantifies post-change performance against an established baseline. It defines clear thresholds for acceptable performance changes, ensuring new code modifications do not significantly slow down the existing scanning engine.

How do I set up performance baselines for Rust Cargo benchmarks?

Set up performance baselines by capturing initial metrics for key operations using Cargo benchmarks before applying code changes. The baseline measurement establishes a reference point to accurately identify and quantify any subsequent performance regressions.

Can I enforce acceptance criteria for performance deltas across multiple Rust repositories?

Yes, you can enforce acceptance criteria for performance deltas across specified repositories. The workflow compares post-change benchmark results against established baselines and automatically flags changes that exceed your defined performance degradation thresholds.

Does this regression testing workflow work with existing CI/CD pipelines?

Yes, this performance regression testing integrates with CI/CD pipelines to automatically evaluate code quality. It runs Cargo benchmarks on critical code paths during the pipeline execution to ensure modifications meet performance acceptance criteria before deployment.

When should I run a performance regression check on my codebase?

Run a performance regression check before merging changes that modify critical code paths or the core scanning engine. This ensures the new code is not significantly slower than the established baseline and maintains expected performance standards.