About run-rust-benchmarks
A skill for running Rust benchmarks and comparing their average runtimes with the C implementation. It can run benchmarks for a crate or a named benchmark, and instructs users to run each benchmark only once.
Key features
- 01Runs benchmarks for a chosen crate
- 02Supports a named benchmark
- 03Compares Rust and C average runtimes
- 04Avoids rerunning completed benchmarks
Use cases
- 01Measure a Rust benchmark crate
- 02Run one named benchmark
- 03Compare Rust and C implementation timings
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ redisearch/ redisearch --skill run-rust-benchmarksAfter installing, type/run-rust-benchmarksin Claude Code to confirm it loaded.
Details
From the project READMERust 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
- Check the arguments provided above:
- If a crate name is provided, run benchmarks for that crate:
cd src/redisearch_rs && cargo bench -p <crate_name> - If both crate and bench name are provided, run the specific bench:
cd src/redisearch_rs && cargo bench -p <crate_name> <bench_name>
- If a crate name is provided, run benchmarks for that crate:
- 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.
- Once the benchmarks are complete, generate a summary comparing the average run times between the Rust and C implementations.
Common Benchmark Commands
# Bench given crate
cd src/redisearch_rs && cargo bench -p rqe_iterators_bencher
cd src/redisearch_rs && cargo bench -p inverted_index_bencher
# Run a specific benchmark
cd src/redisearch_rs && cargo bench -p rqe_iterators_bencher "Iterator - InvertedIndex - Numeric - Read Dense"
Comments
Markdown supported