Include countme crate to count important data structures.

This commit is contained in:
Aleksey Kladov 2021-01-21 19:04:50 +03:00
parent 235583f3fc
commit e5c5c0a040
9 changed files with 58 additions and 4 deletions

View file

@ -38,6 +38,7 @@ pub(crate) fn status(db: &RootDatabase, file_id: Option<FileId>) -> String {
format_to!(buf, "{}\n", syntax_tree_stats(db));
format_to!(buf, "{} (macros)\n", macro_syntax_tree_stats(db));
format_to!(buf, "{} total\n", memory_usage());
format_to!(buf, "\ncounts:\n{}", profile::countme::get_all());
if let Some(file_id) = file_id {
format_to!(buf, "\nfile info:\n");
@ -60,6 +61,7 @@ pub(crate) fn status(db: &RootDatabase, file_id: Option<FileId>) -> String {
None => format_to!(buf, "does not belong to any crate"),
}
}
buf
}