ruff/crates/ruff_benchmark
Dhruv Manilawala 9aa43d5f91
Separate red_knot into CLI and red_knot_workspace crates (#12623)
## Summary

This PR separates the current `red_knot` crate into two crates:
1. `red_knot` - This will be similar to the `ruff` crate, it'll act as
the CLI crate
2. `red_knot_workspace` - This includes everything except for the CLI
functionality from the existing `red_knot` crate

Note that the code related to the file watcher is in
`red_knot_workspace` for now but might be required to extract it out in
the future.

The main motivation for this change is so that we can have a `red_knot
server` command. This makes it easier to test the server out without
making any changes in the VS Code extension. All we need is to specify
the `red_knot` executable path in `ruff.path` extension setting.

## Test Plan

- `cargo build`
- `cargo clippy --workspace --all-targets --all-features`
- `cargo shear --fix`
2024-08-02 11:24:36 +00:00
..
benches Separate red_knot into CLI and red_knot_workspace crates (#12623) 2024-08-02 11:24:36 +00:00
src Remove criterion/codspeed compat layer (#12524) 2024-07-26 12:22:16 +02:00
Cargo.toml Separate red_knot into CLI and red_knot_workspace crates (#12623) 2024-08-02 11:24:36 +00:00
README.md Update contributing docs to use cargo bench -p ruff_benchmark (#9535) 2024-01-15 14:57:30 -05:00

Ruff Benchmarks

The ruff_benchmark crate benchmarks the linter and the formatter on individual files:

# Run once on the "baseline".
cargo bench -p ruff_benchmark -- --save-baseline=main

# Compare against the "baseline".
cargo bench -p ruff_benchmark -- --baseline=main

# Run the lexer benchmarks.
cargo bench -p ruff_benchmark lexer -- --baseline=main

See CONTRIBUTING.md on how to use these benchmarks.