mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 21:05:08 +00:00
![]() ## Summary This PR adds a benchmarking script for the formatter, which benchmarks the Ruff formatter against Black, yapf, and autopep8. Three benchmarks are included: 1. Format everything. 2. Format everything, but use a single thread. 3. Format everything, but `--check` (don't write to disk). There's some nuance in figuring out the right combination of arguments to each command, but the _main_ nuance is to ensure that we always run the given formatter (and modify the target repo in-place) prior to benchmarking it, so that the formatters aren't disadvantaged by the existing formatting of the target repo. (E.g.: prior to benchmarking Black's preview style, we need to make sure we format the target repo with Black's preview style; otherwise, preview style appears much slower.) Part of https://github.com/astral-sh/ruff/issues/7309. |
||
---|---|---|
.. | ||
benchmarks | ||
_utils.py | ||
add_plugin.py | ||
add_rule.py | ||
check_docs_formatted.py | ||
check_ecosystem.py | ||
Dockerfile.ecosystem | ||
ecosystem_all_check.py | ||
ecosystem_all_check.sh | ||
ecosystem_all_check_entrypoint.sh | ||
formatter_ecosystem_checks.sh | ||
generate_known_standard_library.py | ||
generate_mkdocs.py | ||
pyproject.toml | ||
transform_readme.py | ||
update_ambiguous_characters.py | ||
update_schemastore.py |