mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-28 23:38:00 +00:00
[ty] Track heap usage of salsa structs (#19790)
Co-authored-by: Micha Reiser <micha@reiser.io>
This commit is contained in:
parent
6a05d46ef6
commit
f34b65b7a0
35 changed files with 269 additions and 124 deletions
|
|
@ -211,7 +211,7 @@ fn all_submodule_names_for_package(db: &dyn Db, file: File) -> Option<Vec<Name>>
|
|||
}
|
||||
|
||||
/// A module that resolves to a file (`lib.py` or `package/__init__.py`)
|
||||
#[salsa::tracked(debug)]
|
||||
#[salsa::tracked(debug, heap_size=ruff_memory_usage::heap_size)]
|
||||
pub struct FileModule<'db> {
|
||||
#[returns(ref)]
|
||||
name: ModuleName,
|
||||
|
|
@ -226,7 +226,7 @@ pub struct FileModule<'db> {
|
|||
///
|
||||
/// Namespace packages are special because there are
|
||||
/// multiple possible paths and they have no corresponding code file.
|
||||
#[salsa::tracked(debug)]
|
||||
#[salsa::tracked(debug, heap_size=ruff_memory_usage::heap_size)]
|
||||
pub struct NamespacePackage<'db> {
|
||||
#[returns(ref)]
|
||||
name: ModuleName,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue