diff options
Diffstat (limited to 'crates/ra_ide/src')
-rw-r--r-- | crates/ra_ide/src/status.rs | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/crates/ra_ide/src/status.rs b/crates/ra_ide/src/status.rs index 45411b357..08e6f69cb 100644 --- a/crates/ra_ide/src/status.rs +++ b/crates/ra_ide/src/status.rs | |||
@@ -2,10 +2,7 @@ use std::{fmt, iter::FromIterator, sync::Arc}; | |||
2 | 2 | ||
3 | use hir::MacroFile; | 3 | use hir::MacroFile; |
4 | use ra_db::{ | 4 | use ra_db::{ |
5 | salsa::{ | 5 | salsa::debug::{DebugQueryTable, TableEntry}, |
6 | debug::{DebugQueryTable, TableEntry}, | ||
7 | Database, | ||
8 | }, | ||
9 | FileTextQuery, SourceRootId, | 6 | FileTextQuery, SourceRootId, |
10 | }; | 7 | }; |
11 | use ra_ide_db::{ | 8 | use ra_ide_db::{ |
@@ -14,15 +11,15 @@ use ra_ide_db::{ | |||
14 | }; | 11 | }; |
15 | use ra_prof::{memory_usage, Bytes}; | 12 | use ra_prof::{memory_usage, Bytes}; |
16 | use ra_syntax::{ast, Parse, SyntaxNode}; | 13 | use ra_syntax::{ast, Parse, SyntaxNode}; |
14 | use rustc_hash::FxHashMap; | ||
17 | 15 | ||
18 | use crate::FileId; | 16 | use crate::FileId; |
19 | use rustc_hash::FxHashMap; | ||
20 | 17 | ||
21 | fn syntax_tree_stats(db: &RootDatabase) -> SyntaxTreeStats { | 18 | fn syntax_tree_stats(db: &RootDatabase) -> SyntaxTreeStats { |
22 | db.query(ra_db::ParseQuery).entries::<SyntaxTreeStats>() | 19 | ra_db::ParseQuery.in_db(db).entries::<SyntaxTreeStats>() |
23 | } | 20 | } |
24 | fn macro_syntax_tree_stats(db: &RootDatabase) -> SyntaxTreeStats { | 21 | fn macro_syntax_tree_stats(db: &RootDatabase) -> SyntaxTreeStats { |
25 | db.query(hir::db::ParseMacroQuery).entries::<SyntaxTreeStats>() | 22 | hir::db::ParseMacroQuery.in_db(db).entries::<SyntaxTreeStats>() |
26 | } | 23 | } |
27 | 24 | ||
28 | // Feature: Status | 25 | // Feature: Status |
@@ -35,10 +32,10 @@ fn macro_syntax_tree_stats(db: &RootDatabase) -> SyntaxTreeStats { | |||
35 | // | VS Code | **Rust Analyzer: Status** | 32 | // | VS Code | **Rust Analyzer: Status** |
36 | // |=== | 33 | // |=== |
37 | pub(crate) fn status(db: &RootDatabase) -> String { | 34 | pub(crate) fn status(db: &RootDatabase) -> String { |
38 | let files_stats = db.query(FileTextQuery).entries::<FilesStats>(); | 35 | let files_stats = FileTextQuery.in_db(db).entries::<FilesStats>(); |
39 | let syntax_tree_stats = syntax_tree_stats(db); | 36 | let syntax_tree_stats = syntax_tree_stats(db); |
40 | let macro_syntax_tree_stats = macro_syntax_tree_stats(db); | 37 | let macro_syntax_tree_stats = macro_syntax_tree_stats(db); |
41 | let symbols_stats = db.query(LibrarySymbolsQuery).entries::<LibrarySymbolsStats>(); | 38 | let symbols_stats = LibrarySymbolsQuery.in_db(db).entries::<LibrarySymbolsStats>(); |
42 | format!( | 39 | format!( |
43 | "{}\n{}\n{}\n{} (macros)\n\n\nmemory:\n{}\ngc {:?} seconds ago", | 40 | "{}\n{}\n{}\n{} (macros)\n\n\nmemory:\n{}\ngc {:?} seconds ago", |
44 | files_stats, | 41 | files_stats, |