<!-- Thank you for contributing to Ruff/ty! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? (Please prefix with `[ty]` for ty pull requests.) - Does this pull request include references to any relevant issues? - Does this PR follow our AI policy (https://github.com/astral-sh/.github/blob/main/AI_POLICY.md)? --> ## Summary Addresses all `uv audit` findings. <!-- What's the purpose of the change? What does it do, and why? --> ## Test Plan NFC. <!-- How was it tested? --> --- <sub>Stack created with <a href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
benchmarks
Utilities for benchmarking Ruff.
Getting Started
Run ./scripts/benchmarks/setup.sh to clone the benchmarking target (CPython).
If you're looking to benchmark Ruff against other tools, you'll also need to run uv venv --project ./scripts/benchmarks,
activate the venv and finally uv sync --project ./scripts/benchmarks to create a virtual environment with the required dependencies.
Running Benchmarks
Run ./scripts/benchmarks/run.sh to run Ruff over the target repo (CPython). The
./scripts/benchmarks folder contains a few other benchmarks (e.g., scripts/benchmarks/run_comparisons.sh
compares Ruff to a variety of other tools).
Generating Plots
The Vega specification for the benchmark plot depicted in the root README can be found at
scripts/benchmarks/graph-spec.json. You can render this JSON spec in the Vega Editor.
The images seen in the README are generated by exporting the rendered Vega spec as SVG (at around
688px wide) and manually bolding the Ruff title and benchmark time. The dark mode variant is
generated by changing the fill from fill="#333333" to fill="#C9D1D9".