perf

Benchmark a command across Git branches and report timing regressions.

23|4|Updated Sep 5, 2013
One-click install
npx skills add https://github.com/drn/dots --skill perf-drn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: perf
Source: https://github.com/drn/dots/tree/main/agents/skills/perf
Command: npx skills add https://github.com/drn/dots --skill perf-drn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill automates the process of measuring and comparing the performance of code between different branches, helping you identify regressions or improvements.

Core Features & Use Cases

  • Before/After Benchmarking: Compares the execution time of a command on your current branch against a specified base branch.
  • Statistical Analysis: Provides detailed timing metrics (min, max, mean, median, stddev) for both branches.
  • Use Case: Before merging a new feature, use this Skill to benchmark your application's build process or a critical test suite to ensure no performance degradation has been introduced.

Quick Start

Benchmark the command 'go test -bench=. ./pkg/...' using the default number of runs and base branch.

Frequently Asked Questions about perf

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

FAQPage Schema
How do I benchmark code performance between git branches before merging?

To benchmark code performance, you can run a specific command across your current Git branch and a base reference. This Skill executes the command multiple times on both branches, analyzes the timing results, and reports any regressions or improvements.

What statistical metrics are provided when profiling performance regressions?

Performance profiling provides detailed timing metrics including minimum, maximum, mean, median, and standard deviation. These statistics help you statistically analyze execution times and accurately identify whether a code optimization improved or degraded performance.

Can I use this benchmarking tool to run regression testing on a specific test suite?

Yes, you can use this benchmarking tool for regression testing by passing your test suite execution command. It will compare the test suite execution time on your current branch against a base branch to ensure no performance degradation has been introduced.

What's the best way to compare code optimization results before and after changes?

The best way to compare code optimization results is before-and-after benchmarking against a base Git reference. By executing the same command multiple times on both branches, you get a statistical comparison that validates whether your optimization actually improved performance.

Do I need to install external dependencies to run performance benchmarks?

No, you do not need to install external dependencies to run performance benchmarks. The Skill operates using built-in scripts and relies on Git to switch between branches for measuring execution times.