mirror of
https://github.com/oxc-project/oxc.git
synced 2026-11-04 10:29:58 +00:00
As an alternative to https://github.com/oxc-project/oxc/pull/27477, this requires minimal changes in the linter in order to add allocation tracking for individual rules. We run each rule individually and then compare the diff in heap size before and after as well as the number of system and arena allocations. Additionally, this runs as a local-only opt-in feature so that we don't check this in CI automatically, since linter allocations are likely quite noisy.
38 lines
967 B
TOML
38 lines
967 B
TOML
[package]
|
|
name = "oxc_track_memory_allocations"
|
|
version = "0.0.0"
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
publish = false
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[lib]
|
|
doctest = false
|
|
|
|
[[bin]]
|
|
name = "oxc_track_memory_allocations"
|
|
test = false
|
|
doctest = false
|
|
|
|
[dependencies]
|
|
oxc_allocator = { workspace = true, features = ["track_allocations"] }
|
|
oxc_formatter = { workspace = true }
|
|
oxc_linter = { workspace = true, optional = true, features = ["track_allocations"] }
|
|
oxc_minifier = { workspace = true }
|
|
oxc_parser = { workspace = true }
|
|
oxc_semantic = { workspace = true }
|
|
oxc_tasks_common = { workspace = true }
|
|
oxc_transformer = { workspace = true }
|
|
|
|
humansize = { workspace = true }
|
|
mimalloc-safe = { workspace = true }
|
|
rustc-hash = { workspace = true, optional = true }
|
|
saphyr = { workspace = true }
|
|
|
|
[features]
|
|
linter = ["dep:oxc_linter", "dep:rustc-hash"]
|
|
# Sentinel flag that should only get enabled if we're running under `--all-features`
|
|
is_all_features = []
|