mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 18:28:24 +00:00
Add benchmark scripts for no-IO (#1925)
This commit is contained in:
parent
f3bf008aed
commit
2ed1f78873
7 changed files with 736 additions and 38 deletions
26
scripts/benchmarks/run_all.sh
Executable file
26
scripts/benchmarks/run_all.sh
Executable file
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
###
|
||||
# Benchmark Ruff's performance against a variety of similar tools, suppressing output as much as
|
||||
# possible (so as to reduce I/O overhead).
|
||||
###
|
||||
|
||||
# Note: Flake8's `checker.py` requires the following variant of `mp_run`:
|
||||
# def _mp_run(filename: str) -> tuple[str, Results, dict[str, int]]:
|
||||
# try:
|
||||
# return FileChecker(
|
||||
# filename=filename, plugins=_mp_plugins, options=_mp_options
|
||||
# ).run_checks()
|
||||
# except:
|
||||
# return (filename, [], {
|
||||
# "files": 0,
|
||||
# "logical lines": 0,
|
||||
# "physical lines": 0,
|
||||
# "tokens": 0,
|
||||
# })
|
||||
|
||||
hyperfine --ignore-failure --warmup 5 \
|
||||
"./target/release/ruff ./resources/test/cpython/ --no-cache --silent --select ALL" \
|
||||
"flake8 resources/test/cpython -qq --docstring-convention=all" \
|
||||
"pycodestyle resources/test/cpython -qq" \
|
||||
"pylint resources/test/cpython -j 0 --recursive=y --disable=E,W,C,R"
|
Loading…
Add table
Add a link
Reference in a new issue