Report vfs memory usage in status command

This commit is contained in:
Lukas Wirth 2023-04-22 09:57:48 +02:00
parent f00dcf9a69
commit f2295cda42
3 changed files with 14 additions and 2 deletions

View file

@ -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 {