mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-27 12:29:28 +00:00
Add cargo dev repeat
for profiling (#5144)
## Summary This adds a new subcommand that can be used as ```shell cargo build --bin ruff_dev --profile=release-debug perf record -g -F 999 target/release-debug/ruff_dev repeat --repeat 30 --exit-zero --no-cache path/to/cpython > /dev/null flamegraph --perfdata perf.data ``` ## Test Plan This is a ruff internal script. I successfully used it to profile cpython with the instructions above
This commit is contained in:
parent
be11cae619
commit
361d45f2b2
4 changed files with 31 additions and 2 deletions
|
@ -159,7 +159,7 @@ fn format(files: &[PathBuf]) -> Result<ExitStatus> {
|
|||
Ok(ExitStatus::Success)
|
||||
}
|
||||
|
||||
fn check(args: CheckArgs, log_level: LogLevel) -> Result<ExitStatus> {
|
||||
pub fn check(args: CheckArgs, log_level: LogLevel) -> Result<ExitStatus> {
|
||||
let (cli, overrides) = args.partition();
|
||||
|
||||
// Construct the "default" settings. These are used when no `pyproject.toml`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue