ruff/scripts/benchmarks
Dylan 5faf72a4d9
Some checks are pending
CI / Determine changes (push) Waiting to run
CI / cargo fmt (push) Waiting to run
CI / cargo clippy (push) Blocked by required conditions
CI / cargo test (linux) (push) Blocked by required conditions
CI / cargo test (linux, release) (push) Blocked by required conditions
CI / cargo test (windows) (push) Blocked by required conditions
CI / cargo test (wasm) (push) Blocked by required conditions
CI / cargo build (release) (push) Waiting to run
CI / cargo build (msrv) (push) Blocked by required conditions
CI / cargo fuzz build (push) Blocked by required conditions
CI / fuzz parser (push) Blocked by required conditions
CI / test scripts (push) Blocked by required conditions
CI / ecosystem (push) Blocked by required conditions
CI / Fuzz for new ty panics (push) Blocked by required conditions
CI / cargo shear (push) Blocked by required conditions
CI / python package (push) Waiting to run
CI / pre-commit (push) Waiting to run
CI / mkdocs (push) Waiting to run
CI / formatter instabilities and black similarity (push) Blocked by required conditions
CI / test ruff-lsp (push) Blocked by required conditions
CI / check playground (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
[ty Playground] Release / publish (push) Waiting to run
Bump 0.11.13 (#18484)
2025-06-05 15:18:38 -05:00
..
dark.svg Re-run benchmark and update documentation (#1907) 2023-01-16 01:38:58 -05:00
graph-spec.json Re-run benchmark and update documentation (#1907) 2023-01-16 01:38:58 -05:00
light.svg Re-run benchmark and update documentation (#1907) 2023-01-16 01:38:58 -05:00
pyproject.toml Bump 0.11.13 (#18484) 2025-06-05 15:18:38 -05:00
README.md Update benchmark scripts, use uv (#15120) 2024-12-23 11:14:15 +01:00
run.sh Update benchmark scripts, use uv (#15120) 2024-12-23 11:14:15 +01:00
run_all.sh Update benchmark scripts, use uv (#15120) 2024-12-23 11:14:15 +01:00
run_comparisons.sh Update benchmark scripts, use uv (#15120) 2024-12-23 11:14:15 +01:00
run_formatter.sh Update versions in format benchmark script (#8110) 2023-10-21 18:39:31 +00:00
run_plugins.sh Update benchmark scripts, use uv (#15120) 2024-12-23 11:14:15 +01:00
run_silent.sh Update benchmark scripts, use uv (#15120) 2024-12-23 11:14:15 +01:00
setup.sh Update benchmark scripts, use uv (#15120) 2024-12-23 11:14:15 +01:00
uv.lock Update benchmark scripts, use uv (#15120) 2024-12-23 11:14:15 +01:00

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".