RU

run-rust-benchmarks

It runs cargo benchmarks, compares them against C implementation baselines, and creates markdown reports for pull requests.

Install

mkdir -p .claude/skills/run-rust-benchmarks && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/3445" && unzip -o skill.zip -d .claude/skills/run-rust-benchmarks && rm skill.zip

Installs to .claude/skills/run-rust-benchmarks

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Run Rust benchmarks and compare performance with the C implementation. Use this when you work on migrating C code to Rust and want to ensure performance is not regressed.
170 chars✓ has a “when” trigger
Intermediate

Key capabilities

  • Execute crate-specific benchmarks
  • Run targeted individual benchmark tasks
  • Aggregate timing data for performance comparison
  • Generate markdown tables for PR documentation

How it works

Invokes `cargo bench` on specific manifest paths and formats the resulting timing data into a comparison summary.

Inputs & outputs

You give it
Crate name and optional specific benchmark name
You get back
Performance comparison table in markdown

When to use run-rust-benchmarks

  • Compare Rust performance vs C
  • Run crate-specific benchmarks
  • Generate performance report for PR

About this skill

Rust Benchmarks Skill

Run Rust benchmarks and compare performance with the C implementation.

Arguments

  • <crate>: Run the given benchmark crate (e.g., /run-rust-benchmarks rqe_iterators_bencher)
  • <crate> <bench>: Run specific bench in a benchmark crate (e.g., /run-rust-benchmarks rqe_iterators_bencher "Iterator - InvertedIndex - Numeric - Read Dense")

Arguments provided: $ARGUMENTS

Instructions

  1. Check the arguments provided above:
    • If a crate name is provided, run benchmarks for that crate:
      cargo bench --manifest-path src/redisearch_rs/Cargo.toml -p <crate_name>
      
    • If both crate and bench name are provided, run the specific bench:
      cargo bench --manifest-path src/redisearch_rs/Cargo.toml -p <crate_name> <bench_name>
      
  2. Run benchmarks only once. If the output is too large or truncated, extract the timing data from the saved output file rather than re-running the benchmarks.
  3. Once the benchmarks are complete, generate a summary comparing the average run times between the Rust and C implementations.
  4. Ask the user: "Would you like a copyable markdown version for your PR description?" If yes, re-emit the summary table inside a fenced ```markdown code block so it can be pasted directly.

Common Benchmark Commands

# Bench given crate
cargo bench --manifest-path src/redisearch_rs/Cargo.toml -p rqe_iterators_bencher
cargo bench --manifest-path src/redisearch_rs/Cargo.toml -p inverted_index_bencher

# Run a specific benchmark
cargo bench --manifest-path src/redisearch_rs/Cargo.toml -p rqe_iterators_bencher "Iterator - InvertedIndex - Numeric - Read Dense"

When not to use it

  • When attempting to benchmark non-Rust components
  • When a benchmark has already been run in the same session

Prerequisites

Cargo installed

Limitations

  • Avoids re-running benchmarks if output is available
  • Limited to predefined benchmark crates

How it compares

It automatically structures performance regression data for PRs, whereas manual benchmarking requires manual data aggregation.

Compared to similar skills

run-rust-benchmarks side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
run-rust-benchmarks (this skill)12moReviewIntermediate
rust-async-patterns112moReviewIntermediate
debug-lldb17moReviewIntermediate
rust-pro326dNo flagsAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry