mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 23:25:03 +00:00
migrate to salsas interning
This commit is contained in:
parent
2fc2d4373b
commit
6b993a9760
8 changed files with 109 additions and 111 deletions
|
@ -23,16 +23,11 @@ pub(crate) fn status(db: &RootDatabase) -> String {
|
|||
let files_stats = db.query(FileTextQuery).entries::<FilesStats>();
|
||||
let syntax_tree_stats = syntax_tree_stats(db);
|
||||
let symbols_stats = db.query(LibrarySymbolsQuery).entries::<LibrarySymbolsStats>();
|
||||
let n_defs = {
|
||||
let interner: &hir::HirInterner = db.as_ref();
|
||||
interner.len()
|
||||
};
|
||||
format!(
|
||||
"{}\n{}\n{}\n{} defs\n\nmemory:\n{}\ngc {:?} seconds ago",
|
||||
"{}\n{}\n{}\n\n\nmemory:\n{}\ngc {:?} seconds ago",
|
||||
files_stats,
|
||||
symbols_stats,
|
||||
syntax_tree_stats,
|
||||
n_defs,
|
||||
MemoryStats::current(),
|
||||
db.last_gc.elapsed().as_secs(),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue