mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Report vfs memory usage in status command
This commit is contained in:
parent
f00dcf9a69
commit
f2295cda42
3 changed files with 14 additions and 2 deletions
|
@ -440,6 +440,10 @@ impl GlobalStateSnapshot {
|
|||
ProjectWorkspace::DetachedFiles { .. } => None,
|
||||
})
|
||||
}
|
||||
|
||||
pub(crate) fn vfs_memory_usage(&self) -> usize {
|
||||
self.vfs.read().0.memory_usage()
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn file_id_to_url(vfs: &vfs::Vfs, id: FileId) -> Url {
|
||||
|
|
|
@ -103,6 +103,7 @@ pub(crate) fn handle_analyzer_status(
|
|||
.collect::<Vec<&AbsPath>>()
|
||||
);
|
||||
}
|
||||
format_to!(buf, "\nVfs memory usage: {}\n", snap.vfs_memory_usage());
|
||||
buf.push_str("\nAnalysis:\n");
|
||||
buf.push_str(
|
||||
&snap
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue